|
Boost : |
From: Philippe A. Bouchard (philippe_at_[hidden])
Date: 2003-07-02 02:12:13
Schoenborn, Oliver wrote:
>> On Tuesday, July 1, 2003, at 08:21 PM, Schoenborn, Oliver wrote:
>>
>> >> On Tuesday, Jul 1, 2003, at 17:36 America/Denver, Schoenborn, Oliver
>> >> wrote:
>> >>>>
>> >>>> On Tuesday, Jul 1, 2003, at 14:38 America/Denver, Boost wrote:
>> >>>>
>> >>>>> Why is there no strict-ownership smart-pointer in boost?
>> >>>>> Just curious to know what the reasons are. Thanks,
>> >>>>
>> >>>> What do want beyond what boost::scoped_ptr and
>> >>>> std::auto_ptr provide?
>> >>>
>> >>> Ability to be used in STL containers, and explicit transfer of
>> >>> ownership capabilities (e.g. *no* move-on-copy etc).
[...]
If you wish to easily use a simple ownership ptr and do not worry bypassing
some "mutable usage rules", you could always try the good old non standard
mutable_ptr<>:
http://groups.yahoo.com/group/boost/files/ptr/mutable_ptr.hpp
[...]
Some algorithms may not work portably at run-time but simple ones will, this
will depend on your project needs. But it is always possible to convert
the list< mutable_ptr<X> > -> list<X *> before doing so.
** Use at your own risk ** ;)
Philippe A. Bouchard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk