Added link to enable_shared_from_this.html.

[SVN r17397]
This commit is contained in:
Peter Dimov
2003-02-14 10:55:20 +00:00
parent 300f8f7b9a
commit deab8ca1bb

View File

@ -359,7 +359,7 @@ shared_ptr<X> make_shared_from_another(another_ptr<X> qx)
instance. Example:</p>
<pre>void f(X * p)
{
shared_ptr&lt;X&gt; px(<i>???</I>);
shared_ptr&lt;X&gt; px(<i>???</i>);
}
</pre>
<p>Inside <code>f</code>, we'd like to create a <code>shared_ptr</code> to <code>*p</code>.</p>
@ -389,7 +389,7 @@ public:
X()
{
shared_ptr&lt;X&gt; this_(<i>???</I>);
shared_ptr&lt;X&gt; this_(<i>???</i>);
}
};
</pre>
@ -461,7 +461,7 @@ public:
virtual shared_ptr&lt;X&gt; getX()
{
shared_ptr&lt;X&gt; px(<i>???</I>);
shared_ptr&lt;X&gt; px(<i>???</i>);
return px;
}
};
@ -496,8 +496,9 @@ public:
}
};
</pre>
<p>The library now includes a helper class template <code>enable_shared_from_this</code>
that can be used to encapsulate the solution:</p>
<p>The library now includes a helper class template <code><A href="enable_shared_from_this.html">
enable_shared_from_this</A></code> that can be used to encapsulate the
solution:</p>
<pre>class impl: public X, public Y, public enable_shared_from_this&lt;impl&gt;
{
public:
@ -751,9 +752,9 @@ public:
all weak pointers will automatically expire.</p>
<hr>
<p>$Date$</p>
<p>Copyright <20> 2003 Peter Dimov. Permission to copy, use, modify, sell and
<p><small>Copyright <20> 2003 Peter Dimov. Permission to copy, use, modify, sell and
distribute this document is granted provided this copyright notice appears in
all copies. This document is provided "as is" without express or implied
warranty, and with no claim as to its suitability for any purpose.</p>
warranty, and with no claim as to its suitability for any purpose.</small></p>
</body>
</html>