Boost logo

Boost :

Subject: Re: [boost] [smart_ptr] scoped_array / shared_array (size_t) constructor
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-11-04 18:36:47

Le 04/11/11 17:02, Andrey Semashev a écrit :
> On Friday, November 04, 2011 16:51:12 Olaf van der Spek wrote:
>> Great. Does anyone else have comments / concerns about a (size_t)
>> constructor?
> I still don't like the idea. If you really want to add this feature, please
> retain the current interface intact. You could add a special manipulator to
> make the allpcation request explicit, like this:
> boost::scoped_array< int> p(boost::allocate_count(10));
> Here allocate_count is a simple class that holds the size of the array to be
> allocated. Alternatively, Boost.Parameter could be used, but it is quite heavy
> for such basic tools like smart pointers.

Boost list run by bdawes at, gregod at, cpdaniel at, john at