Subject: Re: [boost] [Block Pointer] Question about cycles rationale
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-14 08:23:44
On 03/14/2016 07:35 AM, Rob Stewart wrote:
> Neither answer is great. The exception could occur during shack unwinding, so you couldn't use your pointers in very many contexts. No exception means UB, which means users have to remember a special case and thereby lose safety.
> I fail to see how that is better than using weak_ptr. In that case, one must always be explicit rather than remember special cases.
It is much more complicated to use an explicit weak_ptr because you need
to know where the cycle ends, etc.
What if you have a neural network? How do you define where to use
weak_ptr over shared_ptr, etc.?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk