Boost logo

Boost :

Subject: Re: [boost] [smart_ptr] scoped_array / shared_array (size_t) constructor
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-11-01 12:20:24


On Tue, Nov 1, 2011 at 5:13 PM, Richard Hadsell
<hadsell_at_[hidden]> wrote:
> On 11/01/2011 12:00 PM, Olaf van der Spek wrote:
>>
>> Actually, what is the problem?
>> Do you use (NULL) or (0) instead of just () (for construction).
>>
> I would have to check through a lot of code, not just my own, to look for
> places that are initialized with 0.  I would expect to see this in
> initializers for data members that were formerly simple pointers.

Adding a (size_t) constructor would produce ambiguity errors, but
those are easy to fix by using the default constructor instead. Would
that be acceptable?

Olaf


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