forked from boostorg/smart_ptr
intrusive_ptr::reset() added.
[SVN r45089]
This commit is contained in:
@ -126,6 +126,11 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset()
|
||||||
|
{
|
||||||
|
this_type().swap( *this );
|
||||||
|
}
|
||||||
|
|
||||||
void reset( T * rhs )
|
void reset( T * rhs )
|
||||||
{
|
{
|
||||||
this_type( rhs ).swap( *this );
|
this_type( rhs ).swap( *this );
|
||||||
|
@ -62,6 +62,8 @@
|
|||||||
intrusive_ptr & <A href="#assignment" >operator=</A>(intrusive_ptr const & r);
|
intrusive_ptr & <A href="#assignment" >operator=</A>(intrusive_ptr const & r);
|
||||||
template<class Y> intrusive_ptr & <A href="#assignment" >operator=</A>(intrusive_ptr<Y> const & r);
|
template<class Y> intrusive_ptr & <A href="#assignment" >operator=</A>(intrusive_ptr<Y> const & r);
|
||||||
intrusive_ptr & <A href="#assignment" >operator=</A>(T * r);
|
intrusive_ptr & <A href="#assignment" >operator=</A>(T * r);
|
||||||
|
|
||||||
|
void <a href="#reset" >reset</a>();
|
||||||
void <a href="#reset" >reset</a>(T * r);
|
void <a href="#reset" >reset</a>(T * r);
|
||||||
|
|
||||||
T & <A href="#indirection" >operator*</A>() const; // never throws
|
T & <A href="#indirection" >operator*</A>() const; // never throws
|
||||||
@ -148,6 +150,10 @@ intrusive_ptr & operator=(T * r);</pre>
|
|||||||
<P><B>Returns:</B> <code>*this</code>.</P>
|
<P><B>Returns:</B> <code>*this</code>.</P>
|
||||||
</BLOCKQUOTE>
|
</BLOCKQUOTE>
|
||||||
<H3><a name="reset">reset</a></H3>
|
<H3><a name="reset">reset</a></H3>
|
||||||
|
<pre>void reset();</pre>
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr().swap(*this)</code>.</P>
|
||||||
|
</BLOCKQUOTE>
|
||||||
<pre>void reset(T * r);</pre>
|
<pre>void reset(T * r);</pre>
|
||||||
<BLOCKQUOTE>
|
<BLOCKQUOTE>
|
||||||
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r).swap(*this)</code>.</P>
|
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r).swap(*this)</code>.</P>
|
||||||
|
Reference in New Issue
Block a user