Smart d-ptr in Plasma

Kevin Ottens ervin at kde.org
Thu Aug 22 12:23:57 UTC 2013


On Thursday 22 August 2013 13:39:39 Ivan Čukić wrote:
> > Well, I can add one more. They use variadic templates which are not in the
> > list of C++11 features which can be used unconditionally in
> > plasma-framework. Can be spared if you loose the forwarded constructor
> > arguments though.
> 
> The older MSVC (which I guess is the problem for including variadics)
> supports IIRC up to n (where n is as low as around 12 arguments). This
> needs to be tested though by someone who has that compiler.
> 
> Anyhow, the private class constructors rarely have more than one argument.
> So, we could support most use-cases by providing fwd constructors for up
> to, for example, 5 args.
 
Yep, let's do that as fallback if Q_COMPILER_VARIADIC_TEMPLATES is not 
defined.

BTW, during lunch I thought about sebas comment, and maybe he got a point... 
That looks useful, so what about putting it in KCoreAddons? It wouldn't cost 
an extra dependency for plasma-framework which already uses it, and it'd give 
it more exposure. Of course means other tier 1 frameworks wouldn't use it, but 
that gives it more chance than plasma-framework already.

If you're interested please bring it up on k-f-d and we'll see where it goes.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130822/1ce42194/attachment.sig>


More information about the Plasma-devel mailing list