
I see that a commit with the following syntax has occurred on trunk. On Fri, Nov 2, 2012 at 6:20 PM, Peter Dimov <lists@pdimov.com> wrote:
shared_ptr<int[]> sp4a = make_shared<int[]>(number_of_ints);//4a: initialized to 0 shared_ptr<int[]> sp4b = make_shared_noinit<int[]>(number_of_ints);//4b: uninitialized
I have one minor suggestion. Given that the make_shared variant which produces shared_ptr<T[]> is spelled make_shared<T[]>, I think it would be very confusing to have the following not work: #include <boost/make_shared.hpp> int main() { auto pInt = boost::make_shared<int[]>(500); return 0; } I would suggest that make_shared_array.hpp be included by make_shared.hpp -- likewise for allocate_shared. Perhaps the array header files should be placed in detail, though I think it's less confusing to include make_shared_array.hpp and not have the non-array make_shared functions. Thanks, Nate