From 372fac679b8db7c42602ca0590c81b2d6778078b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 21 Apr 2019 23:13:06 +0300 Subject: [PATCH] Remove _internal_aliasing_assign --- include/boost/smart_ptr/enable_shared_from_raw.hpp | 3 +-- include/boost/smart_ptr/weak_ptr.hpp | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) 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;