mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 05:34:36 +02:00
get_pointer added.
[SVN r14628]
This commit is contained in:
@@ -135,6 +135,8 @@ void bad()
|
||||
|
||||
template<typename T> void <A href="#free-swap" >swap</A>(shared_ptr<T> & a, shared_ptr<T> & b); // never throws
|
||||
|
||||
template<typename T> T * <A href="#get_pointer" >get_pointer</A>(shared_ptr<T> const & p); // never throws
|
||||
|
||||
template<typename T, typename U>
|
||||
shared_ptr<T> <A href="#shared_static_cast" >shared_static_cast</A>(shared_ptr<U> const & r); // never throws
|
||||
template<typename T, typename U>
|
||||
@@ -424,7 +426,7 @@ q = p;
|
||||
<P><EM>The rest of the comparison operators are omitted by design.]</EM></P>
|
||||
<h3><a name="free-swap">swap</a></h3>
|
||||
<pre>template<typename T>
|
||||
void swap(shared_ptr<T> & a, shared_ptr<T> & b) // never throws</pre>
|
||||
void swap(shared_ptr<T> & a, shared_ptr<T> & b); // never throws</pre>
|
||||
<BLOCKQUOTE>
|
||||
<P><B>Effects:</B> Equivalent to <code>a.swap(b)</code>.</P>
|
||||
<P><B>Throws:</B> nothing.</P>
|
||||
@@ -434,6 +436,15 @@ q = p;
|
||||
<P><EM>[<STRONG>swap</STRONG> is defined in the same namespace as <STRONG>shared_ptr</STRONG>
|
||||
as this is currently the only legal way to supply a <STRONG>swap</STRONG> function
|
||||
that has a chance to be used by the standard library.]</EM></P>
|
||||
<h3><a name="get_pointer">get_pointer</a></h3>
|
||||
<pre>template<typename T>
|
||||
T * get_pointer(shared_ptr<T> const & p); // never throws</pre>
|
||||
<BLOCKQUOTE>
|
||||
<P><B>Returns:</B> <code>p.get()</code>.</P>
|
||||
<P><B>Throws:</B> nothing.</P>
|
||||
<P><B>Notes:</B> Provided as an aid to generic programming. Used by <A href="../bind/mem_fn.html">
|
||||
mem_fn</A>.</P>
|
||||
</BLOCKQUOTE>
|
||||
<h3><a name="shared_static_cast">shared_static_cast</a></h3>
|
||||
<pre>template<typename T, typename U>
|
||||
shared_ptr<T> shared_static_cast(shared_ptr<U> const & r); // never throws</pre>
|
||||
|
Reference in New Issue
Block a user