From 0adb1fb212e9ed9d1fc882d530c404719d3f960f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 22 Jun 2017 15:24:49 +0300 Subject: [PATCH] Add shared_count constructor taking sp_counted_base* --- include/boost/smart_ptr/detail/shared_count.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/smart_ptr/detail/shared_count.hpp b/include/boost/smart_ptr/detail/shared_count.hpp index 1fc1433..ae7d0fb 100644 --- a/include/boost/smart_ptr/detail/shared_count.hpp +++ b/include/boost/smart_ptr/detail/shared_count.hpp @@ -125,6 +125,13 @@ public: { } + BOOST_CONSTEXPR explicit shared_count( sp_counted_base * pi ): pi_( pi ) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + } + template explicit shared_count( Y * p ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id)