
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