Boost logo

Boost :

Subject: Re: [boost] [ANN] "The Boost C++ Libraries", 2nd edition available
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2014-10-31 07:14:33


On 30-10-2014 22:20, Boris Schäling wrote:
> Just a quick announcement: The 2nd edition of my book "The Boost C++
> Libraries" is available.
>
> - It introduces 72 Boost libraries.

Awesome work, Boris.

I'm very happy to see a small chapter on ptr_container.
It's good that you compare it with container<unique_ptr<T>>.

Comment 1: I would prefer examples with unique_ptr to use make_unique.

Comment 2: The are two major other difference betweeen ptr_vector<T> and
vector<unique_ptr<T>>:

A. No element can be null(by default), this can never be guranteed with
vector<unique_ptr<T>>, as you can just move en element out or push_back
a null.

B. Automatic cloning: ptr_containers can be copy'ed, performing a deep
clone of the elements.

kind regards

-Thorsten


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