|
Boost : |
Subject: Re: [boost] [Smart Ptr] make_shared slower thanshared_ptr(new)on VC++9 (and 10) with fix
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2012-04-26 20:56:09
[STL]
> I was surprised when I learned that I was apparently the first one to
> implement this - I just assumed that everyone would write it this way.
[Peter Dimov]
> The original implementation of boost::make_shared was completely
> non-intrusive. I don't think that there was any real need for that, I
> just felt like it. :-)
That's reasonable for an initial implementation, of course. But because only shared_ptr's author can implement control blocks, if make_shared doesn't get its own control block, users can't implement this optimization themselves. So boost::make_shared's implementation should be changed now. :->
STL
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk