There is no safe way to convert an pointer of type right*
to a pointer of type left*
or vice-versa. You must do one of two things:
- Use a pointer of type
top*
instead. It is safe to convert either aleft*
or aright*
to atop*
. - Use a template to perform whatever operation you want to perform on either a
left*
or aright*
(assuming they "look similar" enough that the template code will work on either one).