0 or 0L for empty pointers?

Lubos Lunak l.lunak at suse.cz
Fri Jun 23 13:44:28 BST 2006


On Friday 23 June 2006 14:03, Stefan Teleman wrote:
> On Friday 23 June 2006 07:42, Frans Englich wrote:
> > Yes, some features should be avoided
> > in any case like dynamic_cast, but perhaps there's some template
> > features or the like that should be avoided.
>
> Just out of curiosity, why is dynamic_cast<> a Bad Thing(TM) ?

 It is not, in general. But one needs to be careful when using dynamic_cast 
across dlopen boundaries, because under some conditions g++ emits multiple 
rtti info instances which are not merged without using RTLD_GLOBAL and that 
may make dynamic_cast fail. It should be fixable though.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kde-core-devel mailing list