forked from boostorg/smart_ptr
Add add_ref parameter to intrusive_ptr::reset, add tests for reset.
This commit is contained in:
+6
-3
@@ -67,6 +67,7 @@
|
||||
|
||||
void <a href="#reset" >reset</a>();
|
||||
void <a href="#reset" >reset</a>(T * r);
|
||||
void <a href="#reset" >reset</a>(T * r, bool add_ref);
|
||||
|
||||
T & <A href="#indirection" >operator*</A>() const; // never throws
|
||||
T * <A href="#indirection" >operator-></A>() const; // never throws
|
||||
@@ -161,6 +162,10 @@ intrusive_ptr & operator=(T * r);</pre>
|
||||
<BLOCKQUOTE>
|
||||
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r).swap(*this)</code>.</P>
|
||||
</BLOCKQUOTE>
|
||||
<pre>void reset(T * r, bool add_ref);</pre>
|
||||
<BLOCKQUOTE>
|
||||
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r, add_ref).swap(*this)</code>.</P>
|
||||
</BLOCKQUOTE>
|
||||
<h3><a name="indirection">indirection</a></h3>
|
||||
<pre>T & operator*() const; // never throws</pre>
|
||||
<blockquote>
|
||||
@@ -307,9 +312,7 @@ intrusive_ptr & operator=(T * r);</pre>
|
||||
</BLOCKQUOTE>
|
||||
<hr>
|
||||
<p>
|
||||
$Date$</p>
|
||||
<p>
|
||||
<small>Copyright © 2003-2005 Peter Dimov. Distributed under the Boost Software License, Version
|
||||
<small>Copyright © 2003-2005, 2013 Peter Dimov. Distributed under the Boost Software License, Version
|
||||
1.0. See accompanying file <A href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> or
|
||||
copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>.</small></p>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user