From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-04-28 13:38:17
On Mon, 2008-04-28 at 13:18 -0400, Frank Mori Hess wrote:
> On Monday 28 April 2008 12:32 pm, Daniel Frey wrote:
> > The main point of BOOST_ASSERT(_shared_count.empty()) is to catch more
> > cases than the current test. It breaks three test cases, so once again:
> > Are these tests correct and by design or do they pass by accident?
> They are correct, in that I was testing that my implementation behaved the way
> I expected it to. So they are by design, but only my own design. The
> details of what the esft destructor should choke on are not something that
> have been discussed in depth before.
I hope it's OK if we discuss it now. So far, I was under the impression
that calling shared_from_this() requires that some other shared_ptr
takes ownership later. BOOST_ASSERT( _shared_count.empty() ) tests
exactly that. It's an easy to understand rule and I can see the use
How would you describe/document the behavior you had in mind? What use
case would it serve?
Note that for me it is crucial to understand what needs to be supported
in order to be able to continue optimizing it (if that's possible at
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk