Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-12-21 20:45:29


At 05:47 PM 12/21/2001, Ross Smith wrote:

>Peter Dimov wrote:
>>
>> From: "Fernando Cacciola" <fcacciola_at_[hidden]>
>> > On second thought, this conclusion leads me back to my original
>proposal:
>> > use the technique of grin_ptr<> with
>> > scoped_ptr<>.
>> >
>> > It doesn't make sense to change scoped_ptr<> though,
>>
>> [...]
>>
>> On second thought, this actually makes sense to me. Scoped_ptr
>requirements
>> will change slightly, in that it will require a complete type only when

>its
>> constructor is instantiated.
>>
>> sizeof(scoped_ptr) will increase, but since scoped_ptr is noncopyable,
>this
>> will not have much impact (it's not meant to be put in containers.)
>
>As some of us keep pointing out :-) it wouldn't be necessary to make a
>global choice between the two strategies if you use a policy-based
>pointer.

Yes, agreed.

I've just re-read Andrei's smart pointer chapter. The policy-based
approach seems much more likely to be widely acceptable than endlessly
trying to tweak a small number of smart pointer classes.

--Beman


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