Smart d-ptr in Plasma

Martin Graesslin mgraesslin at kde.org
Thu Aug 22 17:11:09 UTC 2013


On Thursday 22 August 2013 14:23:57 Kevin Ottens wrote:
> 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.
Maybe it would even be an idea for an own (tier 0) framework which could 
contain useful C++11 magic? I guess we will soon have more useful C++11 stuff 
which might make sense to be used in more places.
> 
> If you're interested please bring it up on k-f-d and we'll see where it
> goes.
yes, please :-)

Cheers
Martin
-------------- 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/dcea09ba/attachment.sig>


More information about the Plasma-devel mailing list