Turning off C++ casting?

Paolo Bonzini paolo.bonzini@polimi.it
Thu Feb 20 12:45:00 GMT 2003


> (dynamic_cast<T*>(v)==0 || dynamic_cast<T*>(v)==reinterpret_cast<T*>(v))
>
> can be false in case multiply inheritance and virtual inheritance.

Ooh, right.  But the OP was using

(T*) (void *) (&baseObj)

which is an even uglier version of the reinterpret_cast.

Paolo



More information about the Gcc mailing list