diff --git a/include/boost/smart_ptr/enable_shared_from_raw.hpp b/include/boost/smart_ptr/enable_shared_from_raw.hpp index 5cd3574..d1c47e7 100644 --- a/include/boost/smart_ptr/enable_shared_from_raw.hpp +++ b/include/boost/smart_ptr/enable_shared_from_raw.hpp @@ -144,8 +144,7 @@ template boost::weak_ptr weak_from_raw(T *p) { BOOST_ASSERT(p != 0); - boost::weak_ptr result; - result._internal_aliasing_assign(p->enable_shared_from_raw::weak_from_this(), p); + boost::weak_ptr result(p->enable_shared_from_raw::weak_from_this(), p); return result; } diff --git a/include/boost/smart_ptr/weak_ptr.hpp b/include/boost/smart_ptr/weak_ptr.hpp index ec451bd..5230f35 100644 --- a/include/boost/smart_ptr/weak_ptr.hpp +++ b/include/boost/smart_ptr/weak_ptr.hpp @@ -227,13 +227,6 @@ public: pn.swap(other.pn); } - template - void _internal_aliasing_assign(weak_ptr const & r, element_type * px2) BOOST_SP_NOEXCEPT - { - px = px2; - pn = r.pn; - } - template bool owner_before( weak_ptr const & rhs ) const BOOST_SP_NOEXCEPT { return pn < rhs.pn;