
3 Nov
2012
3 Nov
'12
12:27 a.m.
On 02/11/2012 09:20 p.m., Peter Dimov wrote:
Glen just proposed the same syntax, and I like it, although I prefer
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 would prefer shared_ptr<int[]> sp4a = make_shared<int[]>(number_of_ints); //4a: initialized to 0 shared_ptr<int[]> sp4b = make_shared<int[]>(number_of_ints, noinit); //4b: uninitialized similar to std::nothrow, although it introduces a new type and constant for no particular benefit. Just my $0.02 Agustín K-ballo Bergé.- http://fusionfenix.com