This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Turning off C++ casting?


> (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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]