diff options
Diffstat (limited to 'doc/html/boost/intrusive/pointer_traits.html')
-rw-r--r-- | doc/html/boost/intrusive/pointer_traits.html | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/doc/html/boost/intrusive/pointer_traits.html b/doc/html/boost/intrusive/pointer_traits.html index b78d002efa..462eea998a 100644 --- a/doc/html/boost/intrusive/pointer_traits.html +++ b/doc/html/boost/intrusive/pointer_traits.html @@ -4,11 +4,11 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Struct template pointer_traits</title> <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> <link rel="up" href="../../intrusive/reference.html#header.boost.intrusive.pointer_traits_hpp" title="Header <boost/intrusive/pointer_traits.hpp>"> -<link rel="prev" href="pointer_rebind_idp38187008.html" title="Struct template pointer_rebind<T *, U>"> -<link rel="next" href="pointer_traits_idp38228256.html" title="Struct template pointer_traits<T *>"> +<link rel="prev" href="pointer__idm45425360551952.html" title="Struct template pointer_rebind<T *, U>"> +<link rel="next" href="pointer__idm45425360506800.html" title="Struct template pointer_traits<T *>"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> @@ -21,7 +21,7 @@ </tr></table> <hr> <div class="spirit-nav"> -<a accesskey="p" href="pointer_rebind_idp38187008.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../intrusive/reference.html#header.boost.intrusive.pointer_traits_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pointer_traits_idp38228256.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> +<a accesskey="p" href="pointer__idm45425360551952.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../intrusive/reference.html#header.boost.intrusive.pointer_traits_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pointer__idm45425360506800.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.intrusive.pointer_traits"></a><div class="titlepage"></div> @@ -38,21 +38,22 @@ <span class="keyword">typedef</span> <span class="identifier">Ptr</span> <a class="link" href="pointer_traits.html#boost.intrusive.pointer_traits.pointer"><span class="identifier">pointer</span></a><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">unspecified_type</span> <a class="link" href="pointer_traits.html#boost.intrusive.pointer_traits.element_type"><span class="identifier">element_type</span></a><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">unspecified_type</span> <a class="link" href="pointer_traits.html#boost.intrusive.pointer_traits.difference_type"><span class="identifier">difference_type</span></a><span class="special">;</span> + <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <a class="link" href="pointer_traits.html#boost.intrusive.pointer_traits.rebind"><span class="identifier">rebind</span></a><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">unspecified_type</span> <a class="link" href="pointer_traits.html#boost.intrusive.pointer_traits.reference"><span class="identifier">reference</span></a><span class="special">;</span> - <span class="comment">// <a class="link" href="pointer_traits.html#idp38204128-bb">public static functions</a></span> - <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idp38204688-bb"><span class="identifier">pointer_to</span></a><span class="special">(</span><span class="identifier">reference</span><span class="special">)</span><span class="special">;</span> - <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idp38209936-bb"><span class="identifier">static_cast_from</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> - <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idp38215984-bb"><span class="identifier">const_cast_from</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> - <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idp38222032-bb"><span class="identifier">dynamic_cast_from</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> + <span class="comment">// <a class="link" href="pointer_traits.html#idm45425360531344-bb">public static functions</a></span> + <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idm45425360530784-bb"><span class="identifier">pointer_to</span></a><span class="special">(</span><span class="identifier">reference</span><span class="special">)</span><span class="special">;</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idm45425360525536-bb"><span class="identifier">static_cast_from</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idm45425360519488-bb"><span class="identifier">const_cast_from</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pointer_traits.html#idm45425360513440-bb"><span class="identifier">dynamic_cast_from</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> <span class="special">}</span><span class="special">;</span></pre></div> <div class="refsect1"> -<a name="idp213495568"></a><h2>Description</h2> +<a name="idm45927971235152"></a><h2>Description</h2> <p><a class="link" href="pointer_traits.html" title="Struct template pointer_traits">pointer_traits</a> is the implementation of C++11 std::pointer_traits class with some extensions like castings.</p> <p><a class="link" href="pointer_traits.html" title="Struct template pointer_traits">pointer_traits</a> supplies a uniform interface to certain attributes of pointer-like types.</p> -<p><span class="bold"><strong>Note</strong></span>: When defining a custom family of pointers or references to be used with BI library, make sure the public static conversion functions accessed through the `pointer_traits` interface (`*_cast_from` and `pointer_to`) can properly convert between const and nonconst referred member types <span class="bold"><strong>without the use of implicit constructor calls</strong></span>. It is suggested these conversions be implemented as function templates, where the template argument is the type of the object being converted from. </p> +<p><span class="bold"><strong>Note</strong></span>: When defining a custom family of pointers or references to be used with BI library, make sure the public static conversion functions accessed through the <code class="computeroutput"><a class="link" href="pointer_traits.html" title="Struct template pointer_traits">pointer_traits</a></code> interface (<code class="computeroutput">*_cast_from</code> and <code class="computeroutput">pointer_to</code>) can properly convert between const and nonconst referred member types <span class="bold"><strong>without the use of implicit constructor calls</strong></span>. It is suggested these conversions be implemented as function templates, where the template argument is the type of the object being converted from. </p> <div class="refsect2"> -<a name="idp213500160"></a><h3> +<a name="idm45927971227920"></a><h3> <a name="boost.intrusive.pointer_traitstypes"></a><code class="computeroutput">pointer_traits</code> public types</h3> @@ -74,37 +75,43 @@ </li> <li class="listitem"> <p> +<span class="keyword">typedef</span> <span class="identifier">unspecified</span> <a name="boost.intrusive.pointer_traits.rebind"></a><span class="identifier">rebind</span><span class="special">;</span></p> +<p>Ptr::rebind<U> if such a type exists; otherwise, SomePointer<U, Args> if Ptr is a class template instantiation of the form SomePointer<T, Args>, where Args is zero or more type arguments ; otherwise, the instantiation of rebind is ill-formed.</p> +<pre class="programlisting"><span class="keyword">typename</span> <span class="identifier">rebind_pointer</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span><span class="special">::</span><span class="identifier">type</span></pre> +</li> +<li class="listitem"> +<p> <span class="keyword">typedef</span> <span class="identifier">unspecified_type</span> <a name="boost.intrusive.pointer_traits.reference"></a><span class="identifier">reference</span><span class="special">;</span></p> <p>Ptr::reference if such a type exists (non-standard extension); otherwise, element_type & </p> </li> </ol></div> </div> <div class="refsect2"> -<a name="idp213518640"></a><h3> -<a name="idp38204128-bb"></a><code class="computeroutput">pointer_traits</code> public static functions</h3> +<a name="idm45927971200864"></a><h3> +<a name="idm45425360531344-bb"></a><code class="computeroutput">pointer_traits</code> public static functions</h3> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> -<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idp38204688-bb"></a><span class="identifier">pointer_to</span><span class="special">(</span><span class="identifier">reference</span> r<span class="special">)</span><span class="special">;</span></pre> +<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idm45425360530784-bb"></a><span class="identifier">pointer_to</span><span class="special">(</span><span class="identifier">reference</span> r<span class="special">)</span><span class="special">;</span></pre> <p><span class="bold"><strong>Remark</strong></span>: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise, it is element_type &.</p> <p><span class="bold"><strong>Returns</strong></span>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(reference). Non-standard extension: If such function does not exist, returns pointer(addressof(r));</p> <p><span class="bold"><strong>Note</strong></span>: For non-conforming compilers only the existence of a member function called <code class="computeroutput">pointer_to</code> is checked. </p> </li> <li class="listitem"> -<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idp38209936-bb"></a><span class="identifier">static_cast_from</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span> uptr<span class="special">)</span><span class="special">;</span></pre> +<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idm45425360525536-bb"></a><span class="identifier">static_cast_from</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span> uptr<span class="special">)</span><span class="special">;</span></pre> <p><span class="bold"><strong>Remark</strong></span>: Non-standard extension.</p> <p><span class="bold"><strong>Returns</strong></span>: A dereferenceable pointer to r obtained by calling the static template function Ptr::static_cast_from(UPpr/const UPpr &). If such function does not exist, returns pointer_to(static_cast<element_type&>(*uptr))</p> <p><span class="bold"><strong>Note</strong></span>: For non-conforming compilers only the existence of a member function called <code class="computeroutput">static_cast_from</code> is checked. </p> </li> <li class="listitem"> -<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idp38215984-bb"></a><span class="identifier">const_cast_from</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span> uptr<span class="special">)</span><span class="special">;</span></pre> +<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idm45425360519488-bb"></a><span class="identifier">const_cast_from</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span> uptr<span class="special">)</span><span class="special">;</span></pre> <p><span class="bold"><strong>Remark</strong></span>: Non-standard extension.</p> <p><span class="bold"><strong>Returns</strong></span>: A dereferenceable pointer to r obtained by calling the static template function Ptr::const_cast_from<UPtr>(UPpr/const UPpr &). If such function does not exist, returns pointer_to(const_cast<element_type&>(*uptr))</p> <p><span class="bold"><strong>Note</strong></span>: For non-conforming compilers only the existence of a member function called <code class="computeroutput">const_cast_from</code> is checked. </p> </li> <li class="listitem"> -<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idp38222032-bb"></a><span class="identifier">dynamic_cast_from</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span> uptr<span class="special">)</span><span class="special">;</span></pre> +<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> UPtr<span class="special">></span> <span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idm45425360513440-bb"></a><span class="identifier">dynamic_cast_from</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UPtr</span> <span class="special">&</span> uptr<span class="special">)</span><span class="special">;</span></pre> <p><span class="bold"><strong>Remark</strong></span>: Non-standard extension.</p> -<p><span class="bold"><strong>Returns</strong></span>: A dereferenceable pointer to r obtained by calling the static template function Ptr::dynamic_cast_from<UPtr>(UPpr/const UPpr &). If such function does not exist, returns pointer_to(*dynamic_cast<element_type*>(&*uptr))</p> +<p><span class="bold"><strong>Returns</strong></span>: A dereferenceable pointer to r obtained by calling the static template function Ptr::dynamic_cast_from<UPtr>(UPpr/const UPpr &). If such function does not exist, returns pointer_to(<span class="emphasis"><em>dynamic_cast<element_type</em></span>>(&*uptr))</p> <p><span class="bold"><strong>Note</strong></span>: For non-conforming compilers only the existence of a member function called <code class="computeroutput">dynamic_cast_from</code> is checked. </p> </li> </ol></div> @@ -121,7 +128,7 @@ </tr></table> <hr> <div class="spirit-nav"> -<a accesskey="p" href="pointer_rebind_idp38187008.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../intrusive/reference.html#header.boost.intrusive.pointer_traits_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pointer_traits_idp38228256.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> +<a accesskey="p" href="pointer__idm45425360551952.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../intrusive/reference.html#header.boost.intrusive.pointer_traits_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pointer__idm45425360506800.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> |