Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-26 11:34:26


Daniel Frey:
> When looking at the test case that fails with .use_count() != 0, I don't
> really see why the call to shared_from_this() in line 130 should throw.

The test looks correct to me. After early_px.reset() and px.reset(), no
shared_ptr owns &x. Their initial use_count() is 2, so after the two resets
a weak_ptr to &x should expire (it might be a good idea to add it to the
test). We'll indeed need weak_count::empty to make this and test5 both pass,
though.


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