[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: dynamic_cast performance overhead
From:       Dirk Mueller <mueller () kde ! org>
Date:       2005-06-02 21:18:07
Message-ID: 200506022318.08397.mueller () kde ! org
[Download RAW message or body]

On Thursday 02 June 2005 22:26, Michael Buesch wrote:

> > Maybe a template function or something similiar would be better.
> Such as this. This is tested and prints a friendly debug
> message in DEBUG mode. Otherwise is optimized by the
> compiler to nothing (normal reinterpret_cast).

Which is WRONG. I wonder how you tested that. reinterpret_cast<> doesn't do 
the base pointer adjustment necessary for multiple inheritance. Don't ever 
use such code. And even more important, don't ever make other people use such 
ugly code. 


-- 
Dirk//\
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic