14 Mar
2016
14 Mar
'16
1:42 a.m.
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!