
3 Nov
2009
3 Nov
'09
6:16 p.m.
Frank Mori Hess wrote:
So long as we're innovating, consider adding weak_from_raw as well. It can give you an expired weak_ptr to 'this' from within a destructor, which is useful for deregistration.
I think that would require an aliasing constructor for weak_ptr, or friend access to weak_ptr.
Yes, you're right, I was thinking in terms of the old and busted enable_shared_from_this.
Perhaps a modification of weak_ptr::_internal_assign(), which no longer seems to be used?
Feel free to remove its second argument. :-)