diff --git a/include/boost/enable_shared_from_this.hpp b/include/boost/enable_shared_from_this.hpp index 99c68ba..f474714 100644 --- a/include/boost/enable_shared_from_this.hpp +++ b/include/boost/enable_shared_from_this.hpp @@ -101,6 +101,7 @@ public: _internal_weak_this = shared_ptr(owner, p); }else { + BOOST_ASSERT(owner.unique()); // no weak_ptrs to owner should exist either, but there's no way to check that detail::sp_deleter_wrapper * pd = get_deleter(_internal_shared_this); BOOST_ASSERT( pd != 0 ); pd->set_deleter(owner);