
4 Feb
2013
4 Feb
'13
5:46 p.m.
Can someone please explain why this code:
struct Foo : boost::enable_shared_from_this<Foo> {}; Foo* p_foo = new Foo; boost::shared_ptr<Foo> ptr_foo(p_foo->shared_from_this());
is throwing?
The documentation explains:
http://www.boost.org/doc/libs/1_52_0/libs/smart_ptr/enable_shared_from_this....
<