Update of /cvsroot/boost/boost/libs/smart_ptr
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20483/libs/smart_ptr
Modified Files:
shared_ptr.htm
Log Message:
Aliasing support
Index: shared_ptr.htm
===================================================================
RCS file: /cvsroot/boost/boost/libs/smart_ptr/shared_ptr.htm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- shared_ptr.htm 19 Mar 2006 19:52:00 -0000 1.53
+++ shared_ptr.htm 9 Apr 2007 18:48:47 -0000 1.54
@@ -111,6 +111,7 @@
<A href="#constructors" >shared_ptr</A>(shared_ptr const & r); //
never throws
template<class Y> <A href="#constructors"
>shared_ptr</A>(shared_ptr<Y> const & r); // never throws
+ template<class Y> <A href="#constructors"
>shared_ptr</A>(shared_ptr<Y> const & r, T * p); // never throws
template<class Y> explicit <A href="#constructors"
>shared_ptr</A>(<A href="weak_ptr.htm" >weak_ptr</A><Y> const & r);
template<class Y> explicit <A href="#constructors"
>shared_ptr</A>(std::auto_ptr<Y> & r);
@@ -122,6 +123,7 @@
template<class Y> void <A href="#reset" >reset</A>(Y * p);
template<class Y, class D> void <A href="#reset" >reset</A>(Y * p,
D d);
template<class Y, class D, class A> void <A href="#reset"
>reset</A>(Y * p, D d, A a);
+ template<class Y> void <A href="#reset"
>reset</A>(shared_ptr<Y> const & r, T * p); // never throws
T & <A href="#indirection" >operator*</A>() const; // never throws
T * <A href="#indirection" >operator-></A>() const; // never throws
@@ -253,6 +255,13 @@
r.use_count()</code>.</p>
<p><b>Throws:</b> nothing.</p>
</blockquote>
+ <pre>template<class Y> shared_ptr(shared_ptr<Y>
const & r, T * p); // never throws</pre>
+ <blockquote>
+ <p><b>Effects:</b> constructs a <b>shared_ptr</b> that
<EM>shares ownership</EM> with
+ <b>r</b> and stores <b>p</b>.</p>
+ <p><b>Postconditions:</b> <code>get() == p &&
use_count() == r.use_count()</code>.</p>
+ <p><b>Throws:</b> nothing.</p>
+ </blockquote>
<pre>template<class Y> explicit shared_ptr(<A
href="weak_ptr.htm" >weak_ptr</A><Y> const & r);</pre>
<blockquote>
<p><b>Effects:</b> Constructs a <b>shared_ptr</b> that
<EM>shares ownership</EM> with
@@ -328,6 +337,10 @@
<BLOCKQUOTE>
<P><B>Effects:</B> Equivalent to <code>shared_ptr(p, d,
a).swap(*this)</code>.</P>
</BLOCKQUOTE>
+ <pre>template<class Y> void reset(shared_ptr<Y>
const & r, T * p); // never throws</pre>
+ <BLOCKQUOTE>
+ <P><B>Effects:</B> Equivalent to <code>shared_ptr(r,
p).swap(*this)</code>.</P>
+ </BLOCKQUOTE>
<h3><a name="indirection">indirection</a></h3>
<pre>T & operator*() const; // never throws</pre>
<blockquote>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs