
I looked into make_shared.hpp you attached, and saw several bug in it. Do you know how to remove it from ticket? Here are the bugs: 1. verify_allocation should check passed pointer only in no-exception mode. If exceptions are enabled, allocator::allocate is required to throw bad_alloc, so no check is needed 2. sp_enable_shared_from_this() is called from shared_ptr constructor, so there's no need to call it in make_shared() 3. I made make_shared.hpp to look differently as it was rewritten. No need to make it looking same way. Both #1 and #2 decrease performance of make_shared a little. Also, #1 prevents it from correct handling of allocation failure if exceptions are disabled I recommend you to use original version from patch Thanks 2012/4/26 Ivan Erceg <ierceg@gmail.com>
Yuriy Zubritsky <mt.wizard <at> gmail.com> writes:
and added #defines leaving non-MSVC part intact This isn't needed. I wrote it to be cross-platform, and it also
implements
optimization Stephen wrote about ("we know where you live"). I tested my code on msvc 9 - 11, gcc 4.6, 4.7 and clang.
I figured as much re cross-platform but I don't have anything to test with except VC9/10. I'll drop the related #defines and attach the updated smart_ptr\make_shared.hpp to your ticket.
Thanks, Ivan
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost