forked from boostorg/smart_ptr
intrusive_ptr::reset added
[SVN r37406]
This commit is contained in:
@ -105,6 +105,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
void reset( T * rhs )
|
||||
{
|
||||
this_type( rhs ).swap( *this );
|
||||
}
|
||||
|
||||
T * get() const
|
||||
{
|
||||
return p_;
|
||||
|
@ -61,7 +61,8 @@
|
||||
|
||||
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>(T * r);
|
||||
intrusive_ptr & <A href="#assignment" >operator=</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
|
||||
@ -146,6 +147,11 @@ intrusive_ptr & operator=(T * r);</pre>
|
||||
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r).swap(*this)</code>.</P>
|
||||
<P><B>Returns:</B> <code>*this</code>.</P>
|
||||
</BLOCKQUOTE>
|
||||
<H3><a name="reset">reset</a></H3>
|
||||
<pre>void reset(T * r);</pre>
|
||||
<BLOCKQUOTE>
|
||||
<P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r).swap(*this)</code>.</P>
|
||||
</BLOCKQUOTE>
|
||||
<h3><a name="indirection">indirection</a></h3>
|
||||
<pre>T & operator*() const; // never throws</pre>
|
||||
<blockquote>
|
||||
|
Reference in New Issue
Block a user