[shared_ptr] make_shared and enable_shared_from_this with boost 1.36

4 Dec
2008
4 Dec
'08
1:06 a.m.
The following code throws boost::bad_weak_ptr using boost 1.36. #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> #include <boost/make_shared.hpp> class Test : public boost::enable_shared_from_this<Test> {}; int main() { boost::shared_ptr<Test> test = boost::make_shared<Test>(); test->shared_from_this(); } -- Michael Marcin

4 Dec
4 Dec
4:24 a.m.
New subject: [shared_ptr] make_shared and enable_shared_from_this with boost 1.36
Michael Marcin wrote:
The following code throws boost::bad_weak_ptr using boost 1.36.
See https://svn.boost.org/trac/boost/ticket/2126 I'm eagerly waiting this problem fixed, too.
6036
Age (days ago)
6036
Last active (days ago)
1 comments
2 participants
participants (2)
-
Andrey Semashev
-
Michael Marcin