Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-26 08:45:32

Daniel Frey:

>I refactored enable_shared_from_this in order to remove the _owner flag.
> To test it, you need a small and straight-forward addition to
> detail::weak_count: It needs .empty(), similar to detail::shared_count.

Are you sure that you need to test for emptiness instead of expiration?

X x; // derives from esft

shared_ptr<X> p1( &x, null_deleter() );
p1->shared_from_this(); // OK

shared_ptr<X> p2( &x, null_deleter() );
p2->shared_from_this(); // ??

Boost list run by bdawes at, gregod at, cpdaniel at, john at