From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-05-05 10:37:12
-----BEGIN PGP SIGNED MESSAGE-----
On Wednesday 30 April 2008 13:42 pm, Peter Dimov wrote:
> In principle, a new esft may avoid this by:
> 1. Allowing only (expired) weak_ptr instances to be created in the
> 2. Bringing the weak_ptr instances back to life once a shared_ptr takes
> This however seems to require a relatively major surgery to sp_counted_base
> and friends; I'm not sure I'm comfortable with that.
How uncomfortable are you with it? I might try to implement the "reserved"
weak_ptr idea, if I can add some way to distinguish between "expired and
reserved" and plain old "expired". lock() could return an empty shared_ptr
with a non-null stored pointer for a "reserved" weak_ptr? That's probably
too evil. A "bool reserved() const" member function?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk