From 6f8dc5923c11e580556c2518e89edfb224ddb287 Mon Sep 17 00:00:00 2001 From: Daniel Frey Date: Sat, 26 Apr 2008 15:42:13 +0000 Subject: [PATCH] Added new reset()-counterparts for the new ctors [SVN r44777] --- include/boost/shared_ptr.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/shared_ptr.hpp b/include/boost/shared_ptr.hpp index 1aa6ecc..4710b02 100644 --- a/include/boost/shared_ptr.hpp +++ b/include/boost/shared_ptr.hpp @@ -390,6 +390,18 @@ public: this_type( r, p ).swap( *this ); } + void reset( detail::shared_count const & c, T * p ) + { + this_type( c, p ).swap( *this ); + } + +#if defined( BOOST_HAS_RVALUE_REFS ) + void reset( detail::shared_count && c, T * p ) + { + this_type( static_cast< detail::shared_count && >( c ), p ).swap( *this ); + } +#endif + reference operator* () const // never throws { BOOST_ASSERT(px != 0);