Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Update
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-13 21:42:15


On 03/13/2016 06:29 PM, Gavin Lambert wrote:
>
> Also bear in mind that since people get into bad habits with passing
> smart pointers by value instead of by reference, any such type has to be
> slice-safe or you invite trouble. (ie. someone is going to construct a
> block_root_ptr and then pass it by value as a block_ptr, possibly
> destroying the original copy. In that second design, every single child
> block_ptr will explode at that point.)

I think you are right and I need to add a counter back to the proxy so
that root_ptr<> (was block_ptr<>) can be r-values.

Good one!


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