diff --git a/include/boost/smart_ptr/intrusive_ptr.hpp b/include/boost/smart_ptr/intrusive_ptr.hpp index 42fdd92..e5db609 100644 --- a/include/boost/smart_ptr/intrusive_ptr.hpp +++ b/include/boost/smart_ptr/intrusive_ptr.hpp @@ -146,6 +146,11 @@ public: this_type( rhs ).swap( *this ); } + void reset( T * rhs, bool add_ref ) + { + this_type( rhs, add_ref ).swap( *this ); + } + T * get() const BOOST_NOEXCEPT { return px; diff --git a/intrusive_ptr.html b/intrusive_ptr.html index 7028444..b7e884b 100644 --- a/intrusive_ptr.html +++ b/intrusive_ptr.html @@ -67,6 +67,7 @@ void reset(); void reset(T * r); + void reset(T * r, bool add_ref); T & operator*() const; // never throws T * operator->() const; // never throws @@ -161,6 +162,10 @@ intrusive_ptr & operator=(T * r);
+Effects: Equivalent to
intrusive_ptr(r).swap(*this)
.
void reset(T * r, bool add_ref);+
+Effects: Equivalent to
+intrusive_ptr(r, add_ref).swap(*this)
.
T & operator*() const; // never throws
@@ -307,9 +312,7 @@ intrusive_ptr & operator=(T * r);
- $Date$
-- Copyright © 2003-2005 Peter Dimov. Distributed under the Boost Software License, Version + Copyright © 2003-2005, 2013 Peter Dimov. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.