
13 Jan
2005
13 Jan
'05
12:25 p.m.
Dave wrote:
Hello all,
A direct call to shared_from_this() does not work in a constructor. Is there any way that I may obtain a shared_ptr to myself while under construction?
In short, no. You don't know which deleter to use. But can't you use a static create function as explained here: http://boost.org/libs/smart_ptr/sp_techniques.html#in_constructor