[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Pimpl copying
From: Thiago Macieira <thiago () kde ! org>
Date: 2006-07-19 20:37:15
Message-ID: 200607192237.15311.thiago () kde ! org
[Download RAW message or body]
Peter Kümmel wrote:
>Matthias Kretz wrote:
>> On Tuesday 18 July 2006 14:26, Peter Kümmel wrote:
>>> BTW the cast is the price they pay for their Private "Hinterwelt",
>>> means there is a second class hierarchy behind the scene.
>>
>> The cast is a noop (reinterpret_cast) and therefore not a price payed
>> in performance.
>
>I wonder if a static_cast would not be enought.
Not without defining both classes, so that the compiler knows that there
is an inheritance tree. I think.
>> The cast is safe as long as you don't use multiple inheritance.
>
>Qt: "What is multiple inheritance?" ;)
Not only does Qt use multiple inheritance in some parts, it also has
provisions for it in the meta object system. Think of Q_GADGET and the
plugin architecture.
The only thing that you're not allowed to do is inherit from QObject
multiply -- that is, diamond-shaped multiple inheritance.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic