Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-04-28 07:48:55


At 06:18 PM 4/19/02 -0700, Andrei Alexandrescu wrote:

>> 4. destructive_copy
>> typedef typename Select<OP::destructive_copy, smart_ptr, const
>> smart_ptr>::Result
>> copy_arg;
>> Does not seems reasonable. What will I do with auto_ptr that expect
>> non-const argument for assingment and copy construction? That mean it
>will
>> be mutable in any class that contain it. I better do once const_cast.
So
>> hole logic about destructive_copy should be removed. So no need t
oworry
>> about Select facility.
>
>This constructor was carefully designed (read: hacked for many nights) to
>fully emulate the std::auto_ptr design (read: amazingly intelligent
hack).
>I suggest we keep it so that smart_ptr remains a borg that swallows all
>other pointers, auto_ptr included :o).

That's a reasonable objective, but only if it can be done without seriously
distorting the rest of the design.

--Beman


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