summaryrefslogtreecommitdiff
path: root/doc/html/boost/container/allocator_traits.html
blob: eaeacaef0b6be6b73b5e74b1d1cd89ff5ac06d07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template allocator_traits</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<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="../../boost_container_header_reference.html#header.boost.container.allocator_traits_hpp" title="Header &lt;boost/container/allocator_traits.hpp&gt;">
<link rel="prev" href="allocator/rebind.html" title="Struct template rebind">
<link rel="next" href="allocator_traits/portable_rebind_alloc.html" title="Struct template portable_rebind_alloc">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<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>
</div>
<div class="refentry">
<a name="boost.container.allocator_traits"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template allocator_traits</span></h2>
<p>boost::container::allocator_traits</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<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;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Allocator<span class="special">&gt;</span> 
<span class="keyword">struct</span> <a class="link" href="allocator_traits.html" title="Struct template allocator_traits">allocator_traits</a> <span class="special">{</span>
  <span class="comment">// <a class="link" href="allocator_traits.html#boost.container.allocator_traitstypes">types</a></span>
  <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>                        
  <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>                            
  <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>                               
  <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>                         
  <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>                             
  <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>                       
  <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>                          
  <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>                    
  <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>                       
  <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>                             
  <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.propagate_on_c_idp51817008"><span class="identifier">propagate_on_container_copy_assignment</span></a><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.propagate_on_c_idp51818864"><span class="identifier">propagate_on_container_move_assignment</span></a><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">see_documentation</span>                     <a class="link" href="allocator_traits.html#boost.container.allocator_traits.propagate_on_c_idp51820720"><span class="identifier">propagate_on_container_swap</span></a><span class="special">;</span>           
  <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>                       
  <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>               
  <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>                          
  <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>                         

  <span class="comment">// member classes/structs/unions</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> 
  <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>
    <span class="comment">// types</span>
    <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>
  <span class="special">}</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="allocator_traits.html#idp51833584-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="allocator_traits.html#idp51834144-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>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="allocator_traits.html#idp51838064-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>
  <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="allocator_traits.html#idp51843360-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>
  <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#idp51848448-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>
  <span class="keyword">static</span> <span class="identifier">size_type</span> <a class="link" href="allocator_traits.html#idp51853968-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>
  <span class="keyword">static</span> <span class="identifier">Allocator</span> <a class="link" href="allocator_traits.html#idp51857968-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>
  <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> 
    <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="allocator_traits.html#idp51861280-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>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="allocator_traits.html#idp51868416-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>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="allocator_traits.html#idp51873104-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>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.10.15.4.3.4"></a><h2>Description</h2>
<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>
<div class="refsect2">
<a name="id-1.3.10.15.4.3.4.3"></a><h3>
<a name="boost.container.allocator_traitstypes"></a><code class="computeroutput">allocator_traits</code> 
        public
       types</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>
<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>
<p>Allocator::pointer if such a type exists; otherwise, value_type* </p>
</li>
<li class="listitem">
<p>
<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>
<p>Allocator::const_pointer if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::rebind&lt;const </p>
</li>
<li class="listitem">
<p>
<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>
<p>Non-standard extension Allocator::reference if such a type exists; otherwise, value_type&amp; </p>
</li>
<li class="listitem">
<p>
<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>
<p>Non-standard extension Allocator::const_reference if such a type exists ; otherwise, const value_type&amp; </p>
</li>
<li class="listitem">
<p>
<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>
<p>Allocator::void_pointer if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::rebind&lt;void&gt;. </p>
</li>
<li class="listitem">
<p>
<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>
<p>Allocator::const_void_pointer if such a type exists ; otherwis e, pointer_traits&lt;pointer&gt;::rebind&lt;const </p>
</li>
<li class="listitem">
<p>
<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>
<p>Allocator::difference_type if such a type exists ; otherwise, pointer_traits&lt;pointer&gt;::difference_type. </p>
</li>
<li class="listitem">
<p>
<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>
<p>Allocator::size_type if such a type exists ; otherwise, make_unsigned&lt;difference_type&gt;::type </p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.propagate_on_c_idp51817008"></a><span class="identifier">propagate_on_container_copy_assignment</span><span class="special">;</span></p>
<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>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.propagate_on_c_idp51818864"></a><span class="identifier">propagate_on_container_move_assignment</span><span class="special">;</span></p>
<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>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="identifier">see_documentation</span> <a name="boost.container.allocator_traits.propagate_on_c_idp51820720"></a><span class="identifier">propagate_on_container_swap</span><span class="special">;</span></p>
<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>
</li>
<li class="listitem">
<p>
<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>
<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>
</li>
<li class="listitem">
<p>
<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>
<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>
</li>
<li class="listitem">
<p>
<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>
<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>
<p>In C++03 compilers <code class="computeroutput">rebind_alloc</code> is a struct derived from an allocator deduced by previously detailed rules. </p>
</li>
<li class="listitem">
<p>
<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>
<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>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.10.15.4.3.4.4"></a><h3>
<a name="idp51833584-bb"></a><code class="computeroutput">allocator_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="idp51834144-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>
<p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.allocate(n)</code> </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="idp51838064-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>
<p><span class="bold"><strong>Returns</strong></span>: <code class="computeroutput">a.deallocate(p, n)</code></p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="idp51843360-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>
<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>
</li>
<li class="listitem">
<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="idp51848448-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>
<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>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">size_type</span> <a name="idp51853968-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>
<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>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">Allocator</span> <a name="idp51857968-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>
<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>
</li>
<li class="listitem">
<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> 
  <span class="keyword">static</span> <span class="keyword">void</span> <a name="idp51861280-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>
<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>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idp51868416-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>
<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>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idp51873104-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>
<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>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2017 Ion
      Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        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>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<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>
</div>
</body>
</html>