Use of Boost library classes in kdecore?

Thiago Macieira thiago at kde.org
Sat Jul 7 23:39:27 BST 2007


David Jarvie wrote:
>QExplicitlySharedDataPointer would be suitable to use with a single
> class, but it still doesn't cope with implicit conversions between base
> and derived classes.

By the way, there are reasons why neither QSharedDataPointer nor 
QExplicitlySharedDataPointer work on implicit conversions.

The first is because it's not intended for that purpose. You're supposed 
to put those around Private-style classes, in the d-pointer.

The second is because it requires a template member function, which is not 
available in all platforms Qt supports (old MSVC 6.0). There are a couple 
of TMF in Qt, but all of those come with a warning that it won't work in 
all platforms, and all have a non-member equivalent (e.g., 
QVariant::value<T> and qVariantValue<T>).

This restriction doesn't apply to KDE, though.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070708/ccb8568f/attachment.sig>


More information about the kde-core-devel mailing list