Boost logo

Boost :

Subject: Re: [boost] [smart_ptr] scoped_array / shared_array (size_t) constructor
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2011-11-06 11:28:20


Olaf van der Spek wrote:
> Does anyone else have comments / concerns about a (size_t) constructor?

Yes. First, please go to the standards committee and get them to add
this to raw pointers:

   float* ptr = new float[128]; // too much typing!
   float* ptr(128); // much better!

When they have agreed to that, come back here and suggest that
scoped_array<> and shared_array<> are updated to match.

As I see it, scoped_array<> is the THIN wrapper around a raw pointer
that delete[]s it when it goes out of scope. And nothing more.

Regards, Phil.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk