Boost logo

Boost Users :

Subject: Re: [Boost-users] [ptr container] up to date?
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2014-07-22 10:26:36


On 22-07-2014 15:37, Michael Powell wrote:
> Hello,

The slicing issue is easily prevented by deriving from boost::noncopyable.

> (http://www.cplusplus.com/reference/memory/auto_ptr/). Also the last
> update was in 2007 or thereabouts. Is this up to date with current
> language features such as std's?, i.e. std::unique_ptr,
> std::shared_ptr?

The library has not been updated for C++11 features. The two major
things here would to use std::unique_ptr as ptr_container::auto_type
and to enable move-semantics.

You can however, easily derive from one of the containers and
add move-semantics to you own container type if that feature is
essential. ptr_container::release() works as a poor man's move-semantics
for C++03.

shared_ptr is not use by the library.

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net