$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] make_shared_array
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2012-11-02 20:27:36
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