Imported Upstream version 1.72.0
[platform/upstream/boost.git] / doc / html / boost / container / allocator_traits.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5 <title>Struct template allocator_traits</title>
6 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
7 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8 <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9 <link rel="up" href="../../boost_container_header_reference.html#header.boost.container.allocator_traits_hpp" title="Header &lt;boost/container/allocator_traits.hpp&gt;">
10 <link rel="prev" href="allocator/rebind.html" title="Struct template rebind">
11 <link rel="next" href="allocator_traits/portable_rebind_alloc.html" title="Struct template portable_rebind_alloc">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table cellpadding="2" width="100%"><tr>
15 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
16 <td align="center"><a href="../../../../index.html">Home</a></td>
17 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
18 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20 <td align="center"><a href="../../../../more/index.htm">More</a></td>
21 </tr></table>
22 <hr>
23 <div class="spirit-nav">
24 <a accesskey="p" href="allocator/rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#header.boost.container.allocator_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="allocator_traits/portable_rebind_alloc.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25 </div>
26 <div class="refentry">
27 <a name="boost.container.allocator_traits"></a><div class="titlepage"></div>
28 <div class="refnamediv">
29 <h2><span class="refentrytitle">Struct template allocator_traits</span></h2>
30 <p>boost::container::allocator_traits</p>
31 </div>
32 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
33 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_container_header_reference.html#header.boost.container.allocator_traits_hpp" title="Header &lt;boost/container/allocator_traits.hpp&gt;">boost/container/allocator_traits.hpp</a>&gt;
34
35 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Allocator<span class="special">&gt;</span> 
36 <span class="keyword">struct</span> <a class="link" href="allocator_traits.html" title="Struct template allocator_traits">allocator_traits</a> <span class="special">{</span>
37   <span class="comment">// <a class="link" href="allocator_traits.html#boost.container.allocator_traitstypes">types</a></span>
38   <span class="keyword">typedef</span> <span class="identifier">Allocator</span>                             <a name="boost.container.allocator_traits.allocator_type"></a><span class="identifier">allocator_type</span><span class="special">;</span>                        
39   <span class="keyword">typedef</span> <span class="identifier">allocator_type</span><span class="special">::</span><span class="identifier">value_type</span>            <a name="boost.container.allocator_traits.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>                            
40   <span class="keyword">typedef</span> <span class="identifier">unspecified</span>                           <a class="link" href="allocator_traits.html#boost.container.allocator_traits.pointer"><span class="identifier">pointer</span></a><span class="special">;</span>                               
41   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.const_pointer"><span class="identifier">const_pointer</span></a><span class="special">;</span>                         
42   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.reference"><span class="identifier">reference</span></a><span class="special">;</span>                             
43   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.const_reference"><span class="identifier">const_reference</span></a><span class="special">;</span>                       
44   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.void_pointer"><span class="identifier">void_pointer</span></a><span class="special">;</span>                          
45   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.const_void_pointer"><span class="identifier">const_void_pointer</span></a><span class="special">;</span>                    
46   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.difference_type"><span class="identifier">difference_type</span></a><span class="special">;</span>                       
47   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.size_type"><span class="identifier">size_type</span></a><span class="special">;</span>                             
48   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.propagat_idm45666075028848"><span class="identifier">propagate_on_container_copy_assignment</span></a><span class="special">;</span>
49   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.propagat_idm45666075026992"><span class="identifier">propagate_on_container_move_assignment</span></a><span class="special">;</span>
50   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.propagat_idm45666075025136"><span class="identifier">propagate_on_container_swap</span></a><span class="special">;</span>           
51   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.is_always_equal"><span class="identifier">is_always_equal</span></a><span class="special">;</span>                       
52   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.is_partially_propagable"><span class="identifier">is_partially_propagable</span></a><span class="special">;</span>               
53   <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.rebind_alloc"><span class="identifier">rebind_alloc</span></a><span class="special">;</span>                          
54   <span class="keyword">typedef</span> <a class="link" href="allocator_traits.html" title="Struct template allocator_traits">allocator_traits</a><span class="special">&lt;</span> <span class="identifier">rebind_alloc</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">&gt;</span> <a class="link" href="allocator_traits.html#boost.container.allocator_traits.rebind_traits"><span class="identifier">rebind_traits</span></a><span class="special">;</span>                         
55
56   <span class="comment">// member classes/structs/unions</span>
57   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> 
58   <span class="keyword">struct</span> <a class="link" href="allocator_traits/portable_rebind_alloc.html" title="Struct template portable_rebind_alloc">portable_rebind_alloc</a> <span class="special">{</span>
59     <span class="comment">// types</span>
60     <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a class="link" href="allocator_traits/portable_rebind_alloc.html#boost.container.allocator_traits.portable_rebind_alloc.type"><span class="identifier">type</span></a><span class="special">;</span>
61   <span class="special">}</span><span class="special">;</span>
62
63   <span class="comment">// <a class="link" href="allocator_traits.html#idm45666075012272-bb">public static functions</a></span>
64   <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="allocator_traits.html#idm45666075011712-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
65   <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="allocator_traits.html#idm45666075007792-bb"><span class="identifier">deallocate</span></a><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">pointer</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
66   <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="allocator_traits.html#idm45666075002496-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">const_void_pointer</span><span class="special">)</span><span class="special">;</span>
67   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="allocator_traits.html#idm45666074997408-bb"><span class="identifier">destroy</span></a><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
68   <span class="keyword">static</span> <span class="identifier">size_type</span> <a class="link" href="allocator_traits.html#idm45666074991888-bb"><span class="identifier">max_size</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
69   <span class="keyword">static</span> <span class="identifier">Allocator</span> <a class="link" href="allocator_traits.html#idm45666074987888-bb"><span class="identifier">select_on_container_copy_construction</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
70   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">class</span> <span class="special">...</span> Args<span class="special">&gt;</span> 
71     <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="allocator_traits.html#idm45666074984576-bb"><span class="identifier">construct</span></a><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">Args</span> <span class="special">&amp;&amp;</span><span class="special">...</span><span class="special">)</span><span class="special">;</span>
72   <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="allocator_traits.html#idm45666074977440-bb"><span class="identifier">storage_is_unpropagable</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
73   <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="allocator_traits.html#idm45666074972752-bb"><span class="identifier">equal</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
74 <span class="special">}</span><span class="special">;</span></pre></div>
75 <div class="refsect1">
76 <a name="id-1.3.10.14.4.3.4"></a><h2>Description</h2>
77 <p>The class template <a class="link" href="allocator_traits.html" title="Struct template allocator_traits">allocator_traits</a> supplies a uniform interface to all allocator types. This class is a C++03-compatible implementation of std::allocator_traits </p>
78 <div class="refsect2">
79 <a name="id-1.3.10.14.4.3.4.3"></a><h3>
80 <a name="boost.container.allocator_traitstypes"></a><code class="computeroutput">allocator_traits</code> 
81         public
82        types</h3>
83 <div class="orderedlist"><ol class="orderedlist" type="1">
84 <li class="listitem">
85 <p>
86 <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <a name="boost.container.allocator_traits.pointer"></a><span class="identifier">pointer</span><span class="special">;</span></p>
87 <p>Allocator::pointer if such a type exists; otherwise, value_type* </p>
88 </li>
89 <li class="listitem">
90 <p>
91 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span></p>
92 <p>Allocator::const_pointer if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::rebind&lt;const </p>
93 </li>
94 <li class="listitem">
95 <p>
96 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.reference"></a><span class="identifier">reference</span><span class="special">;</span></p>
97 <p>Non-standard extension Allocator::reference if such a type exists; otherwise, value_type&amp; </p>
98 </li>
99 <li class="listitem">
100 <p>
101 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.const_reference"></a><span class="identifier">const_reference</span><span class="special">;</span></p>
102 <p>Non-standard extension Allocator::const_reference if such a type exists ; otherwise, const value_type&amp; </p>
103 </li>
104 <li class="listitem">
105 <p>
106 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.void_pointer"></a><span class="identifier">void_pointer</span><span class="special">;</span></p>
107 <p>Allocator::void_pointer if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::rebind&lt;void&gt;. </p>
108 </li>
109 <li class="listitem">
110 <p>
111 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.const_void_pointer"></a><span class="identifier">const_void_pointer</span><span class="special">;</span></p>
112 <p>Allocator::const_void_pointer if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::rebind&lt;const </p>
113 </li>
114 <li class="listitem">
115 <p>
116 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span></p>
117 <p>Allocator::difference_type if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::difference_type. </p>
118 </li>
119 <li class="listitem">
120 <p>
121 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.size_type"></a><span class="identifier">size_type</span><span class="special">;</span></p>
122 <p>Allocator::size_type if such a type exists ; otherwise, make_unsigned&lt;difference_type&gt;::type </p>
123 </li>
124 <li class="listitem">
125 <p>
126 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.propagat_idm45666075028848"></a><span class="identifier">propagate_on_container_copy_assignment</span><span class="special">;</span></p>
127 <p>Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type with an internal constant static boolean member <code class="computeroutput">value</code> == false. </p>
128 </li>
129 <li class="listitem">
130 <p>
131 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.propagat_idm45666075026992"></a><span class="identifier">propagate_on_container_move_assignment</span><span class="special">;</span></p>
132 <p>Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type with an internal constant static boolean member <code class="computeroutput">value</code> == false. </p>
133 </li>
134 <li class="listitem">
135 <p>
136 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.propagat_idm45666075025136"></a><span class="identifier">propagate_on_container_swap</span><span class="special">;</span></p>
137 <p>Allocator::propagate_on_container_swap if such a type exists, otherwise a type with an internal constant static boolean member <code class="computeroutput">value</code> == false. </p>
138 </li>
139 <li class="listitem">
140 <p>
141 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.is_always_equal"></a><span class="identifier">is_always_equal</span><span class="special">;</span></p>
142 <p>Allocator::is_always_equal if such a type exists, otherwise a type with an internal constant static boolean member <code class="computeroutput">value</code> == is_empty&lt;Allocator&gt;::value </p>
143 </li>
144 <li class="listitem">
145 <p>
146 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.is_partially_propagable"></a><span class="identifier">is_partially_propagable</span><span class="special">;</span></p>
147 <p>Allocator::is_partially_propagable if such a type exists, otherwise a type with an internal constant static boolean member <code class="computeroutput">value</code> == false <span class="bold"><strong>Note</strong></span>: Non-standard extension used to implement <code class="computeroutput"><a class="link" href="small_vector_allocator.html" title="Class template small_vector_allocator">small_vector_allocator</a></code>. </p>
148 </li>
149 <li class="listitem">
150 <p>
151 <span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.rebind_alloc"></a><span class="identifier">rebind_alloc</span><span class="special">;</span></p>
152 <p>Defines an allocator: Allocator::rebind&lt;T&gt;::other if such a type exists; otherwise, Allocator&lt;T, Args&gt; if Allocator is a class template instantiation of the form Allocator&lt;U, Args&gt;, where Args is zero or more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.</p>
153 <p>In C++03 compilers <code class="computeroutput">rebind_alloc</code> is a struct derived from an allocator deduced by previously detailed rules. </p>
154 </li>
155 <li class="listitem">
156 <p>
157 <span class="keyword">typedef</span> <a class="link" href="allocator_traits.html" title="Struct template allocator_traits">allocator_traits</a><span class="special">&lt;</span> <span class="identifier">rebind_alloc</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">&gt;</span> <a name="boost.container.allocator_traits.rebind_traits"></a><span class="identifier">rebind_traits</span><span class="special">;</span></p>
158 <p>In C++03 compilers <code class="computeroutput">rebind_traits</code> is a struct derived from <code class="computeroutput">allocator_traits&lt;OtherAlloc&gt;</code>, where <code class="computeroutput">OtherAlloc</code> is the allocator deduced by rules explained in <code class="computeroutput">rebind_alloc</code>. </p>
159 </li>
160 </ol></div>
161 </div>
162 <div class="refsect2">
163 <a name="id-1.3.10.14.4.3.4.4"></a><h3>
164 <a name="idm45666075012272-bb"></a><code class="computeroutput">allocator_traits</code> public static functions</h3>
165 <div class="orderedlist"><ol class="orderedlist" type="1">
166 <li class="listitem">
167 <pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idm45666075011712-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
168 <p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.allocate(n)</code> </p>
169 </li>
170 <li class="listitem">
171 <pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="idm45666075007792-bb"></a><span class="identifier">deallocate</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="identifier">pointer</span> p<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
172 <p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.deallocate(p, n)</code></p>
173 <p><span class="bold"><strong>Throws</strong></span>: Nothing </p>
174 </li>
175 <li class="listitem">
176 <pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idm45666075002496-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">const_void_pointer</span> p<span class="special">)</span><span class="special">;</span></pre>
177 <p><span class="bold"><strong>Effects</strong></span>: calls <code class="computeroutput">a.allocate(n, p)</code> if that call is well-formed; otherwise, invokes <code class="computeroutput">a.allocate(n)</code> </p>
178 </li>
179 <li class="listitem">
180 <pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <span class="keyword">void</span> <a name="idm45666074997408-bb"></a><span class="identifier">destroy</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
181 <p><span class="bold"><strong>Effects</strong></span>: calls <code class="computeroutput">a.destroy(p)</code> if that call is well-formed; otherwise, invokes <code class="computeroutput">p-&gt;~T()</code>. </p>
182 </li>
183 <li class="listitem">
184 <pre class="literallayout"><span class="keyword">static</span> <span class="identifier">size_type</span> <a name="idm45666074991888-bb"></a><span class="identifier">max_size</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
185 <p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.max_size()</code> if that expression is well-formed; otherwise, <code class="computeroutput">numeric_limits&lt;size_type&gt;::max()</code>. </p>
186 </li>
187 <li class="listitem">
188 <pre class="literallayout"><span class="keyword">static</span> <span class="identifier">Allocator</span> <a name="idm45666074987888-bb"></a><span class="identifier">select_on_container_copy_construction</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
189 <p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.select_on_container_copy_construction()</code> if that expression is well-formed; otherwise, a. </p>
190 </li>
191 <li class="listitem">
192 <pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">class</span> <span class="special">...</span> Args<span class="special">&gt;</span> 
193   <span class="keyword">static</span> <span class="keyword">void</span> <a name="idm45666074984576-bb"></a><span class="identifier">construct</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span> p<span class="special">,</span> <span class="identifier">Args</span> <span class="special">&amp;&amp;</span><span class="special">...</span> args<span class="special">)</span><span class="special">;</span></pre>
194 <p><span class="bold"><strong>Effects</strong></span>: calls <code class="computeroutput">a.construct(p, std::forward&lt;Args&gt;(args)...)</code> if that call is well-formed; otherwise, invokes <code class="computeroutput"><code class="computeroutput">placement new</code> (static_cast&lt;void*&gt;(p)) T(std::forward&lt;Args&gt;(args)...)</code> </p>
195 </li>
196 <li class="listitem">
197 <pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idm45666074977440-bb"></a><span class="identifier">storage_is_unpropagable</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="identifier">pointer</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
198 <p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.storage_is_unpropagable(p)</code> if is_partially_propagable::value is true; otherwise, <code class="computeroutput">false</code>. </p>
199 </li>
200 <li class="listitem">
201 <pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idm45666074972752-bb"></a><span class="identifier">equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Allocator</span> <span class="special">&amp;</span> b<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
202 <p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">true</code> if <code class="computeroutput">is_always_equal::value == true</code>, otherwise, <code class="computeroutput">a == b</code>. </p>
203 </li>
204 </ol></div>
205 </div>
206 </div>
207 </div>
208 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
209 <td align="left"></td>
210 <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2018 Ion Gaztanaga<p>
211         Distributed under the Boost Software License, Version 1.0. (See accompanying
212         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
213       </p>
214 </div></td>
215 </tr></table>
216 <hr>
217 <div class="spirit-nav">
218 <a accesskey="p" href="allocator/rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#header.boost.container.allocator_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="allocator_traits/portable_rebind_alloc.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
219 </div>
220 </body>
221 </html>