Subject: Re: [boost] Thoughts on make_shared and shared_from_this in aconstructor
From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2009-03-07 17:54:53
On Saturday 07 March 2009, Peter Dimov wrote:
> Another possible solution is to stick the "weak this" into a
> thread-local static member of enable_shared_from_this<Y>. This also
> works but (absent compiler support for thread locals) doesn't fit into
> the header-only nature of shared_ptr.
It could be added as a extra feature that only exists for compilers with
support for thread local variables (or when threading is disabled). And
since thread_local is in c++0x, it's no barrier for the feature being
added at some point to std::enable_shared_from_this.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk