weak_ptr::expired() added; weak_ptr documentation updated.

[SVN r13141]
This commit is contained in:
Peter Dimov
2002-03-08 16:56:16 +00:00
parent 8e604a9da9
commit c17f8c36c1
3 changed files with 232 additions and 195 deletions
+2 -2
View File
@@ -297,7 +297,7 @@ q = p;
<pre>template&lt;typename T&gt;
bool operator&lt;(shared_ptr&lt;T&gt; const &amp; a, shared_ptr&lt;T&gt; const &amp; b); // never throws</pre>
<blockquote>
<p><b>Returns:</b> an implementation-defined value such that <code>operator&lt;</code>
<p><b>Returns:</b> an implementation-defined value such that <b>operator&lt;</b>
is a strict weak ordering as described in section 25.3 <code>[lib.alg.sorting]</code>
of the C++ standard.</p>
<p><b>Throws:</b> nothing.</p>
@@ -343,7 +343,7 @@ q = p;
<LI>
Otherwise, a default-constructed <STRONG>shared_ptr&lt;T&gt;</STRONG> object.</LI></UL>
<P><B>Throws:</B> <STRONG>std::bad_alloc</STRONG>.</P>
<P><B>Exception safety:</B> If an exception is thrown, the&nbsp;function has no
<P><B>Exception safety:</B> If an exception is thrown, the function has no
effect.</P>
<P><B>Notes:</B> the seemingly equivalent expression</P>
<P><CODE>shared_ptr&lt;T&gt;(dynamic_cast&lt;T*&gt;(r.get()))</CODE></P>