[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: dynamic_cast performance overhead
From: Michael Buesch <mbuesch () freenet ! de>
Date: 2005-06-03 12:27:14
Message-ID: 200506031427.14283.mbuesch () freenet ! de
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Quoting Dirk Mueller <mueller@kde.org>:
> 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.
With single inheritance.
> 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.
I don't force anyone to anything.
I did not say this hack was foolproof.
--
Greetings, Michael
[Attachment #5 (application/pgp-signature)]
>> 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