diff --git a/include/boost/smart_ptr/enable_shared_from_raw.hpp b/include/boost/smart_ptr/enable_shared_from_raw.hpp index b147a01..f659c04 100644 --- a/include/boost/smart_ptr/enable_shared_from_raw.hpp +++ b/include/boost/smart_ptr/enable_shared_from_raw.hpp @@ -51,11 +51,6 @@ protected: BOOST_ASSERT( shared_this_.use_count() <= 1 ); // make sure no dangling shared_ptr objects exist } -private: - - mutable weak_ptr weak_this_; - mutable shared_ptr shared_this_; - private: void init_weak_once() const @@ -111,6 +106,10 @@ private: shared_this_.reset(); } } + + mutable weak_ptr weak_this_; +private: + mutable shared_ptr shared_this_; }; template