Boost logo

Boost :

Subject: Re: [boost] [smart_ptr] scoped_array / shared_array (size_t) constructor
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-11-05 04:00:20


On Saturday, November 05, 2011 01:18:53 Olaf van der Spek wrote:
> On Fri, Nov 4, 2011 at 6:14 PM, Andrey Semashev
>
> <andrey.semashev_at_[hidden]> wrote:
> > I want the smart pointer to be initializable with pointers. This
> > includes
> > explicit NULL.
>
> Why? What's the benefit over using the default constructor?

I want this for interface consistency which can be useful in generic code and,
well, is the expected behavior. Every smart pointer tries to mimic raw
pointers and the constructor ambiguity reduces this similarity. I also don't
want to update my code when it breaks.


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