
27 Apr
2012
27 Apr
'12
12:56 a.m.
[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