BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslma_allocatorutil_cpp03.h
Go to the documentation of this file.
1/// @file bslma_allocatorutil_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslma_allocatorutil_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLMA_ALLOCATORUTIL_CPP03
12#define INCLUDED_BSLMA_ALLOCATORUTIL_CPP03
13
14/// @defgroup bslma_allocatorutil_cpp03 bslma_allocatorutil_cpp03
15/// @brief Provide C++03 implementation for bslma_allocatorutil.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslma
19/// @{
20/// @addtogroup bslma_allocatorutil_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslma_allocatorutil_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslma_allocatorutil_cpp03-classes"> Classes </a>
26/// * <a href="#bslma_allocatorutil_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslma_allocatorutil_cpp03-purpose}
29/// Provide C++03 implementation for bslma_allocatorutil.h
30///
31/// # Classes {#bslma_allocatorutil_cpp03-classes}
32/// See bslma_allocatorutil.h for list of classes
33///
34/// @see bslma_allocatorutil
35///
36/// # Description {#bslma_allocatorutil_cpp03-description}
37/// This component is the C++03 translation of a C++11 component,
38/// generated by the 'sim_cpp11_features.pl' program. If the original header
39/// contains any specially delimited regions of C++11 code, then this generated
40/// file contains the C++03 equivalent, i.e., with variadic templates expanded
41/// and rvalue-references replaced by 'bslmf::MovableRef' objects. The header
42/// code in this file is designed to be '#include'd into the original header
43/// when compiling with a C++03 compiler. If there are no specially delimited
44/// regions of C++11 code, then this header contains no code and is not
45/// '#include'd in the original header.
46///
47/// Generated on Sun Sep 1 05:38:38 2024
48/// Command line: sim_cpp11_features.pl bslma_allocatorutil.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslma
57 * @{
58 */
59/** @addtogroup bslma_allocatorutil_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLMA_ALLOCATORUTIL_H
64
65
66namespace bslma {
67
68// FORWARD DECLARATIONS
69template <class t_ALLOCATOR, class t_TYPE = char>
70struct AllocatorUtil_Traits;
71
72 // ===================
73 // class AllocatorUtil
74 // ===================
75
76/// Namespace for utility functions on allocators
77struct AllocatorUtil {
78
79 private:
80 // PRIVATE CONSTANTS
81 enum { k_MAX_ALIGNMENT = bsls::AlignmentUtil::BSLS_MAX_ALIGNMENT };
82
83 // PRIVATE CLASS METHODS
84 template <class t_TYPE>
85 static char matchBslAlloc(bsl::allocator<t_TYPE> *, int);
86 static long matchBslAlloc(void *, ...);
87 // DECLARED BUT NOT DEFINED
88
89 /// Return the specified `nbytes` raw bytes having the specified
90 /// `alignment` allocated from the specified `allocator`. If
91 /// `alignment` is larger than the largest supported alignment, the
92 /// behavior is determined by the allocator.
93 template <class t_TYPE>
94 static
95 void *allocateBytesImp(
97 std::size_t nbytes,
98 std::size_t alignment);
99 template <class t_TYPE>
100 static
101 void *allocateBytesImp(const bsl::allocator<t_TYPE>& allocator,
102 std::size_t nbytes,
103 std::size_t alignment);
104 template <class t_ALLOCATOR>
105 static
106 typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer
107 allocateBytesImp(const t_ALLOCATOR& allocator,
108 std::size_t nbytes,
109 std::size_t alignment);
110
111 /// Return, to the specified `allocator`, the block of raw memory at the
112 /// specified `p` address having the specified `nbytes` size and the
113 /// specified `alignment`. The behavior is undefined unless `p` refers
114 /// to a block having the same size and alignment allocated from a copy
115 /// of `allocator` and not yet deallocated.
116 template <class t_TYPE>
117 static void
118 deallocateBytesImp(const bsl::polymorphic_allocator<t_TYPE>& allocator,
119 void *p,
120 std::size_t nbytes,
121 std::size_t alignment);
122 template <class t_TYPE>
123 static void
124 deallocateBytesImp(const bsl::allocator<t_TYPE>& allocator,
125 void *p,
126 std::size_t nbytes,
127 std::size_t alignment);
128 template <class t_ALLOCATOR>
129 static void deallocateBytesImp(
130 const t_ALLOCATOR& allocator,
131 typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer p,
132 std::size_t nbytes,
133 std::size_t alignment);
134
135 template <class t_ALLOCATOR, class t_POINTER, class t_VALUE_TYPE>
136 static void deallocateObjectImp(const t_ALLOCATOR& allocator,
137 t_POINTER p,
138 std::size_t n,
139 const t_VALUE_TYPE& );
140
141 template <class t_ALLOCATOR, class t_POINTER, class t_VALUE_TYPE>
142 static void deleteObjectImp(const t_ALLOCATOR& allocator,
143 t_POINTER p,
144 const t_VALUE_TYPE& );
145
146 /// Return `true` if the specified `alignment` is a (positive) power of
147 /// two; otherwise return false.
148 static bool isPowerOf2(std::size_t alignment);
149
150 // PRIVATE TYPES
151
152 /// Metafunction derives from `true_type` if (template argument)
153 /// `t_ALLOC` is derived from any specialization of `bsl::allocator`;
154 /// else derives from `false_type`.
155 template <class t_ALLOC>
156 struct IsDerivedFromBslAllocator
158 1 == sizeof(matchBslAlloc((t_ALLOC *) 0, 0))>
159 {
160 };
161
162 public:
163 // CLASS METHODS
164
165 /// Return the specified `from` allocator adapted to a type most likely
166 /// to be usable for initializing another AA object. Specifically,
167 /// return `from.mechanism()` if `from` is a specialization of
168 /// `bsl::allocator` (or a class derived from `bsl::allocator`);
169 /// otherwise return `from` unchanged.
170 template <class t_ALLOC>
171 static typename bsl::enable_if<
173 t_ALLOC>::type
174 adapt(const t_ALLOC& from);
175 template <class t_TYPE>
176 static bslma::Allocator *adapt(const bsl::allocator<t_TYPE>& from);
177
178 /// Return a pointer to a block of raw memory allocated from the
179 /// specified `allocator` having the specified `nbytes` size and
180 /// optionally specified `alignment`. If `alignment` is larger than the
181 /// largest supported alignment, either the block will be aligned to the
182 /// maximum supported alignment or an exception will be thrown. The
183 /// specific choice of behavior is determined by the allocator: for
184 /// polymorphic allocators the behavior is determined by the memory
185 /// resource, whereas for non-polymorphic allocators, the alignment is
186 /// always truncated to the maximum non-extended alignment.
187 template <class t_ALLOCATOR>
188 static typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer
189 allocateBytes(const t_ALLOCATOR& allocator,
190 std::size_t nbytes,
191 std::size_t alignment = k_MAX_ALIGNMENT);
192
193 /// Return a pointer to a block of raw memory allocated from the
194 /// specified `allocator` having a size and alignment appropriate for an
195 /// object of (templatize parameter) `t_TYPE`. Optionally specify `n`
196 /// for the number of objects; otherwise space for a single object is
197 /// allocated. Since `t_TYPE` cannot be deduced from the function
198 /// parameters, it must be supplied explicitly (in `<>` brackets) by the
199 /// caller.
200 template <class t_TYPE, class t_ALLOCATOR>
201 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
202 allocateObject(const t_ALLOCATOR& allocator, std::size_t n = 1);
203
204 /// If the specified `allowed` tag is `bsl::true_type` assign the
205 /// allocator object at the specified `lhs` address the value of the
206 /// specified `rhs`; otherwise, do nothing, and, in both cases, return a
207 /// modifiable reference to `*lhs`. The `t_TYPE` template parameter is
208 /// typically an allocator type and the `allowed` flag is typically a
209 /// propagation trait dependant on the calling context, such as
210 /// `propagate_on_container_copy_assignment` or
211 /// `propagate_on_container_move_assignment`. Instantiation will fail
212 /// if `allowed` is `true_type` and `t_TYPE` lacks a publically
213 /// accessible copy assignment operator. The behavior is undefined
214 /// unless `allowed` is `true_type` or `*lhs == rhs` before the call.
215 template <class t_TYPE>
216 static t_TYPE& assign(t_TYPE *lhs,
217 const t_TYPE& rhs,
218 bsl::true_type allowed);
219 template <class t_TYPE>
220 static t_TYPE& assign(t_TYPE *lhs,
221 const t_TYPE& rhs,
222 bsl::false_type allowed);
223
224 /// Return to the specified allocator the block raw memory at the
225 /// specified `p` address having the specified `nbytes` size and
226 /// optionally specified `alignment`. The behavior is undefined unless
227 /// `p` refers to a block having the same size and alignment previously
228 /// allocated from a copy of `allocator` and not yet deallocated.
229 template <class t_ALLOCATOR>
230 static void deallocateBytes(
231 const t_ALLOCATOR& allocator,
232 typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer p,
233 std::size_t nbytes,
234 std::size_t alignment
235 = k_MAX_ALIGNMENT);
236
237 /// Return to the specified `allocator` a block of raw memory at the
238 /// specified `p` address that is suitably sized and aligned to hold an
239 /// object of (templatize parameter) `t_TYPE`. Optionally specify `n`
240 /// for the number of objects; otherwise a single object is assumed.
241 /// The behavior is undefined unless `p` refers to a block with the same
242 /// type and number of objects previously allocated from a copy of
243 /// `allocator` and not yet deallocated.
244 template <class t_ALLOCATOR, class t_POINTER>
245 static void deallocateObject(const t_ALLOCATOR& allocator,
246 t_POINTER p,
247 std::size_t n = 1);
248
249 /// Destroy the object at the specified `p` address and return the block
250 /// of memory at `p` to the specified `allocator`. The behavior is
251 /// undefined unless `p` refers to a fully constructed object allocated
252 /// from a copy of `allocator` and not yet destroyed or deallocated.
253 template <class t_ALLOCATOR, class t_POINTER>
254 static void deleteObject(const t_ALLOCATOR& allocator, t_POINTER p);
255
256 /// Return an object of (template parameter) `t_TYPE` allocated from the
257 /// specified `allocator` and constructed with no arguments except that,
258 /// for scoped allocator types such as `bsl::allocator` and
259 /// `bsl::polymorphic_allocator`, `allocator` may be passed to the
260 /// `t_TYPE` constructor (i.e., if `t_TYPE` is AA).
261 template <class t_TYPE, class t_ALLOCATOR>
262 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
263 newObject(const t_ALLOCATOR& allocator);
264
265#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
266// {{{ BEGIN GENERATED CODE
267// Command line: sim_cpp11_features.pl bslma_allocatorutil.h
268#ifndef BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT
269#define BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT 13
270#endif
271#ifndef BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A
272#define BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT
273#endif
274# ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
275#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 0
276 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1>
277 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
278 newObject(const t_ALLOCATOR& allocator,
279 t_ARG1& argument1);
280#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 0
281
282#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 1
283 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01>
284 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
285 newObject(const t_ALLOCATOR& allocator,
286 t_ARG1& argument1,
287 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01);
288#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 1
289
290#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 2
291 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
292 class t_ARGS_02>
293 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
294 newObject(const t_ALLOCATOR& allocator,
295 t_ARG1& argument1,
296 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
297 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02);
298#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 2
299
300#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 3
301 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
302 class t_ARGS_02,
303 class t_ARGS_03>
304 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
305 newObject(const t_ALLOCATOR& allocator,
306 t_ARG1& argument1,
307 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
308 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
309 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03);
310#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 3
311
312#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 4
313 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
314 class t_ARGS_02,
315 class t_ARGS_03,
316 class t_ARGS_04>
317 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
318 newObject(const t_ALLOCATOR& allocator,
319 t_ARG1& argument1,
320 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
321 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
322 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
323 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04);
324#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 4
325
326#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 5
327 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
328 class t_ARGS_02,
329 class t_ARGS_03,
330 class t_ARGS_04,
331 class t_ARGS_05>
332 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
333 newObject(const t_ALLOCATOR& allocator,
334 t_ARG1& argument1,
335 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
336 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
337 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
338 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
339 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05);
340#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 5
341
342#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 6
343 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
344 class t_ARGS_02,
345 class t_ARGS_03,
346 class t_ARGS_04,
347 class t_ARGS_05,
348 class t_ARGS_06>
349 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
350 newObject(const t_ALLOCATOR& allocator,
351 t_ARG1& argument1,
352 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
353 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
354 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
355 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
356 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
357 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06);
358#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 6
359
360#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 7
361 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
362 class t_ARGS_02,
363 class t_ARGS_03,
364 class t_ARGS_04,
365 class t_ARGS_05,
366 class t_ARGS_06,
367 class t_ARGS_07>
368 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
369 newObject(const t_ALLOCATOR& allocator,
370 t_ARG1& argument1,
371 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
372 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
373 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
374 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
375 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
376 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
377 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07);
378#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 7
379
380#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 8
381 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
382 class t_ARGS_02,
383 class t_ARGS_03,
384 class t_ARGS_04,
385 class t_ARGS_05,
386 class t_ARGS_06,
387 class t_ARGS_07,
388 class t_ARGS_08>
389 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
390 newObject(const t_ALLOCATOR& allocator,
391 t_ARG1& argument1,
392 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
393 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
394 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
395 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
396 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
397 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
398 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
399 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08);
400#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 8
401
402#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 9
403 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
404 class t_ARGS_02,
405 class t_ARGS_03,
406 class t_ARGS_04,
407 class t_ARGS_05,
408 class t_ARGS_06,
409 class t_ARGS_07,
410 class t_ARGS_08,
411 class t_ARGS_09>
412 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
413 newObject(const t_ALLOCATOR& allocator,
414 t_ARG1& argument1,
415 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
416 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
417 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
418 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
419 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
420 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
421 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
422 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
423 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09);
424#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 9
425
426#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 10
427 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
428 class t_ARGS_02,
429 class t_ARGS_03,
430 class t_ARGS_04,
431 class t_ARGS_05,
432 class t_ARGS_06,
433 class t_ARGS_07,
434 class t_ARGS_08,
435 class t_ARGS_09,
436 class t_ARGS_10>
437 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
438 newObject(const t_ALLOCATOR& allocator,
439 t_ARG1& argument1,
440 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
441 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
442 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
443 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
444 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
445 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
446 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
447 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
448 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
449 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10);
450#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 10
451
452#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 11
453 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
454 class t_ARGS_02,
455 class t_ARGS_03,
456 class t_ARGS_04,
457 class t_ARGS_05,
458 class t_ARGS_06,
459 class t_ARGS_07,
460 class t_ARGS_08,
461 class t_ARGS_09,
462 class t_ARGS_10,
463 class t_ARGS_11>
464 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
465 newObject(const t_ALLOCATOR& allocator,
466 t_ARG1& argument1,
467 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
468 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
469 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
470 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
471 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
472 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
473 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
474 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
475 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
476 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
477 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11);
478#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 11
479
480#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 12
481 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
482 class t_ARGS_02,
483 class t_ARGS_03,
484 class t_ARGS_04,
485 class t_ARGS_05,
486 class t_ARGS_06,
487 class t_ARGS_07,
488 class t_ARGS_08,
489 class t_ARGS_09,
490 class t_ARGS_10,
491 class t_ARGS_11,
492 class t_ARGS_12>
493 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
494 newObject(const t_ALLOCATOR& allocator,
495 t_ARG1& argument1,
496 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
497 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
498 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
499 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
500 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
501 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
502 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
503 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
504 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
505 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
506 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
507 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12);
508#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 12
509
510#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 13
511 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
512 class t_ARGS_02,
513 class t_ARGS_03,
514 class t_ARGS_04,
515 class t_ARGS_05,
516 class t_ARGS_06,
517 class t_ARGS_07,
518 class t_ARGS_08,
519 class t_ARGS_09,
520 class t_ARGS_10,
521 class t_ARGS_11,
522 class t_ARGS_12,
523 class t_ARGS_13>
524 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
525 newObject(const t_ALLOCATOR& allocator,
526 t_ARG1& argument1,
527 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
528 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
529 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
530 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
531 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
532 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
533 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
534 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
535 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
536 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
537 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
538 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12,
539 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_13) arguments_13);
540#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 13
541
542# endif
543
544#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 0
545 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1>
546 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
547 newObject(const t_ALLOCATOR& allocator,
548 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1);
549#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 0
550
551#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 1
552 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01>
553 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
554 newObject(const t_ALLOCATOR& allocator,
555 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
556 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01);
557#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 1
558
559#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 2
560 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
561 class t_ARGS_02>
562 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
563 newObject(const t_ALLOCATOR& allocator,
564 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
565 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
566 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02);
567#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 2
568
569#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 3
570 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
571 class t_ARGS_02,
572 class t_ARGS_03>
573 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
574 newObject(const t_ALLOCATOR& allocator,
575 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
576 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
577 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
578 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03);
579#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 3
580
581#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 4
582 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
583 class t_ARGS_02,
584 class t_ARGS_03,
585 class t_ARGS_04>
586 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
587 newObject(const t_ALLOCATOR& allocator,
588 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
589 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
590 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
591 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
592 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04);
593#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 4
594
595#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 5
596 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
597 class t_ARGS_02,
598 class t_ARGS_03,
599 class t_ARGS_04,
600 class t_ARGS_05>
601 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
602 newObject(const t_ALLOCATOR& allocator,
603 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
604 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
605 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
606 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
607 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
608 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05);
609#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 5
610
611#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 6
612 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
613 class t_ARGS_02,
614 class t_ARGS_03,
615 class t_ARGS_04,
616 class t_ARGS_05,
617 class t_ARGS_06>
618 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
619 newObject(const t_ALLOCATOR& allocator,
620 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
621 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
622 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
623 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
624 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
625 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
626 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06);
627#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 6
628
629#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 7
630 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
631 class t_ARGS_02,
632 class t_ARGS_03,
633 class t_ARGS_04,
634 class t_ARGS_05,
635 class t_ARGS_06,
636 class t_ARGS_07>
637 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
638 newObject(const t_ALLOCATOR& allocator,
639 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
640 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
641 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
642 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
643 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
644 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
645 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
646 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07);
647#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 7
648
649#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 8
650 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
651 class t_ARGS_02,
652 class t_ARGS_03,
653 class t_ARGS_04,
654 class t_ARGS_05,
655 class t_ARGS_06,
656 class t_ARGS_07,
657 class t_ARGS_08>
658 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
659 newObject(const t_ALLOCATOR& allocator,
660 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
661 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
662 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
663 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
664 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
665 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
666 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
667 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
668 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08);
669#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 8
670
671#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 9
672 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
673 class t_ARGS_02,
674 class t_ARGS_03,
675 class t_ARGS_04,
676 class t_ARGS_05,
677 class t_ARGS_06,
678 class t_ARGS_07,
679 class t_ARGS_08,
680 class t_ARGS_09>
681 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
682 newObject(const t_ALLOCATOR& allocator,
683 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
684 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
685 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
686 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
687 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
688 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
689 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
690 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
691 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
692 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09);
693#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 9
694
695#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 10
696 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
697 class t_ARGS_02,
698 class t_ARGS_03,
699 class t_ARGS_04,
700 class t_ARGS_05,
701 class t_ARGS_06,
702 class t_ARGS_07,
703 class t_ARGS_08,
704 class t_ARGS_09,
705 class t_ARGS_10>
706 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
707 newObject(const t_ALLOCATOR& allocator,
708 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
709 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
710 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
711 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
712 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
713 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
714 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
715 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
716 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
717 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
718 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10);
719#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 10
720
721#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 11
722 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
723 class t_ARGS_02,
724 class t_ARGS_03,
725 class t_ARGS_04,
726 class t_ARGS_05,
727 class t_ARGS_06,
728 class t_ARGS_07,
729 class t_ARGS_08,
730 class t_ARGS_09,
731 class t_ARGS_10,
732 class t_ARGS_11>
733 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
734 newObject(const t_ALLOCATOR& allocator,
735 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
736 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
737 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
738 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
739 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
740 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
741 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
742 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
743 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
744 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
745 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
746 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11);
747#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 11
748
749#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 12
750 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
751 class t_ARGS_02,
752 class t_ARGS_03,
753 class t_ARGS_04,
754 class t_ARGS_05,
755 class t_ARGS_06,
756 class t_ARGS_07,
757 class t_ARGS_08,
758 class t_ARGS_09,
759 class t_ARGS_10,
760 class t_ARGS_11,
761 class t_ARGS_12>
762 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
763 newObject(const t_ALLOCATOR& allocator,
764 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
765 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
766 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
767 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
768 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
769 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
770 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
771 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
772 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
773 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
774 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
775 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
776 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12);
777#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 12
778
779#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 13
780 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
781 class t_ARGS_02,
782 class t_ARGS_03,
783 class t_ARGS_04,
784 class t_ARGS_05,
785 class t_ARGS_06,
786 class t_ARGS_07,
787 class t_ARGS_08,
788 class t_ARGS_09,
789 class t_ARGS_10,
790 class t_ARGS_11,
791 class t_ARGS_12,
792 class t_ARGS_13>
793 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
794 newObject(const t_ALLOCATOR& allocator,
795 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
796 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
797 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
798 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
799 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
800 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
801 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
802 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
803 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
804 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
805 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
806 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
807 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12,
808 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_13) arguments_13);
809#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_A >= 13
810
811#else
812// The generated code below is a workaround for the absence of perfect
813// forwarding in some compilers.
814# ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
815 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class... t_ARGS>
816 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
817 newObject(const t_ALLOCATOR& allocator,
818 t_ARG1& argument1,
819 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... arguments);
820# endif
821
822 template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class... t_ARGS>
823 static typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
824 newObject(const t_ALLOCATOR& allocator,
825 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
826 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... arguments);
827// }}} END GENERATED CODE
828#endif
829
830 /// If the specified `allowed` tag is `bsl::true_type`, swap the values
831 /// of allocators at the specified `pa` and `pb` addresses using ADL
832 /// swap (with `std::swap` in scope); otherwise, do nothing. The
833 /// `t_TYPE` template parameter is typically an allocator type and the
834 /// `allowed` flag is typically a propagation trait dependant on the
835 /// calling context, such as `propagate_on_container_swap`.
836 /// Instantiation will fail if `allowed` is `false_type` and `t_TYPE` is
837 /// not swappable (i.e., because it lacks a publically available
838 /// assignment operator). The behavior is undefined unless `allowed` is
839 /// `true_type` or '*pa ==
840 /// *pb' before the call.
841 template <class t_TYPE>
842 static void swap(t_TYPE *pa, t_TYPE *pb, bsl::false_type allowed);
843 template <class t_TYPE>
844 static void swap(t_TYPE *pa, t_TYPE *pb, bsl::true_type allowed);
845};
846
847// ============================================================================
848// TEMPLATE AND INLINE FUNCTION IMPLEMENTATIONS
849// ============================================================================
850
851 // --------------------------
852 // class AllocatorUtil_Traits
853 // --------------------------
854
855/// Extend the notion of `allocator_traits` to apply to both standard
856/// allocator and to pointer-to-memory-resource types. If the (template
857/// parameter) `t_ALLOCATOR` is a non-pointer type (i.e., an allocator
858/// class), then inherits from
859/// `bsl::allocator_traits<t_ALLOCATOR>::rebind_traits<t_TYPE>`. However,
860/// if `t_ALLOCATOR` is a pointer type, then inherits from
861/// `bsl::allocator_traits<bsl::allocator<t_TYPE>>` for pointers to classes
862/// derived from `bslma::Allocator` and from
863/// `bsl::allocator_traits<bsl::polymorphic_allocator<t_TYPE>>` for pointers
864/// to other classes derived from `bsl::memory_resource`. This primary
865/// template is for non-pointer `t_ALLOCATOR` template arguments.
866template <class t_ALLOCATOR, class t_TYPE>
867struct AllocatorUtil_Traits
868 : bsl::allocator_traits<t_ALLOCATOR>::template rebind_traits<t_TYPE> {
869
872};
873
874/// This specialization is for allocators expressed as a pointer to class
875/// derived from `bsl::memory_resource`. The base class will be
876/// `bsl::allocator_traits<bsl::allocator<t_TYPE>>` if `t_MEMORY_RSRC` is
877/// derived from `bsl::Allocator`; otherwise the base class will be
878/// `bsl::allocator_traits<bsl::polymorphic_allocator<t_TYPE>>`.
879template <class t_MEMORY_RSRC, class t_TYPE>
880struct AllocatorUtil_Traits<t_MEMORY_RSRC *, t_TYPE> : bsl::allocator_traits<
881 typename bsl::conditional<
885 >
886{
887
888 // MANDATES
889 BSLMF_ASSERT((bsl::is_convertible<t_MEMORY_RSRC *,
890 bsl::memory_resource *>::value));
893};
894
895 // -------------------
896 // class AllocatorUtil
897 // -------------------
898
899// PRIVATE CLASS METHODS
900template <class t_TYPE>
901inline
902void *AllocatorUtil::allocateBytesImp(
903 const bsl::polymorphic_allocator<t_TYPE>& allocator,
904 std::size_t nbytes,
905 std::size_t alignment)
906{
907 return allocator.resource()->allocate(nbytes, alignment);
908}
909
910template <class t_TYPE>
911inline
912void *AllocatorUtil::allocateBytesImp(const bsl::allocator<t_TYPE>& allocator,
913 std::size_t nbytes,
914 std::size_t alignment)
915{
916 return allocator.resource()->allocate(nbytes, alignment);
917}
918
919template <class t_ALLOCATOR>
920typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer
921AllocatorUtil::allocateBytesImp(const t_ALLOCATOR& allocator,
922 std::size_t nbytes,
923 std::size_t alignment)
924{
925 BSLMF_ASSERT(4 <= k_MAX_ALIGNMENT && k_MAX_ALIGNMENT <= 32);
926
927 static const int k_8 = k_MAX_ALIGNMENT < 8 ? k_MAX_ALIGNMENT : 8;
928 static const int k_16 = k_MAX_ALIGNMENT < 16 ? k_MAX_ALIGNMENT : 16;
929
930 typedef typename bsls::AlignmentToType< 1>::Type AlignType1;
931 typedef typename bsls::AlignmentToType< 2>::Type AlignType2;
932 typedef typename bsls::AlignmentToType< 4>::Type AlignType4;
933 typedef typename bsls::AlignmentToType<k_8>::Type AlignType8;
934 typedef typename bsls::AlignmentToType<k_16>::Type AlignType16;
935 typedef typename bsls::AlignmentToType<k_MAX_ALIGNMENT>::Type AlignTypeMax;
936
937 if (alignment > k_MAX_ALIGNMENT) {
938 alignment = k_MAX_ALIGNMENT;
939 }
940
941 std::size_t n = (nbytes + alignment - 1) / alignment;
942
943 switch (alignment) {
944 case 1: return allocateObject<AlignType1 >(allocator, n);
945 case 2: return allocateObject<AlignType2 >(allocator, n);
946 case 4: return allocateObject<AlignType4 >(allocator, n);
947 case 8: return allocateObject<AlignType8 >(allocator, n);
948 case 16: return allocateObject<AlignType16 >(allocator, n);
949 default: return allocateObject<AlignTypeMax>(allocator, n);
950 }
951}
952
953template <class t_TYPE>
954inline
955void AllocatorUtil::deallocateBytesImp(
956 const bsl::polymorphic_allocator<t_TYPE>& allocator,
957 void *p,
958 std::size_t nbytes,
959 std::size_t alignment)
960{
961 return allocator.resource()->deallocate(p, nbytes, alignment);
962}
963
964template <class t_TYPE>
965inline
966void AllocatorUtil::deallocateBytesImp(
967 const bsl::allocator<t_TYPE>& allocator,
968 void *p,
969 std::size_t nbytes,
970 std::size_t alignment)
971{
972 return allocator.resource()->deallocate(p, nbytes, alignment);
973}
974
975template <class t_ALLOCATOR>
976void AllocatorUtil::deallocateBytesImp(
977 const t_ALLOCATOR& allocator,
978 typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer p,
979 std::size_t nbytes,
980 std::size_t alignment)
981{
982 BSLMF_ASSERT(4 <= k_MAX_ALIGNMENT && k_MAX_ALIGNMENT <= 32);
983
984 static const int k_8 = k_MAX_ALIGNMENT < 8 ? k_MAX_ALIGNMENT : 8;
985 static const int k_16 = k_MAX_ALIGNMENT < 16 ? k_MAX_ALIGNMENT : 16;
986
987 typedef typename bsls::AlignmentToType< 1>::Type AlignType1;
988 typedef typename bsls::AlignmentToType< 2>::Type AlignType2;
989 typedef typename bsls::AlignmentToType< 4>::Type AlignType4;
990 typedef typename bsls::AlignmentToType<k_8>::Type AlignType8;
991 typedef typename bsls::AlignmentToType<k_16>::Type AlignType16;
992 typedef typename bsls::AlignmentToType<k_MAX_ALIGNMENT>::Type AlignTypeMax;
993
994 typedef typename AllocatorUtil_Traits<t_ALLOCATOR,
995 AlignType1 >::pointer Ptr1;
996 typedef typename AllocatorUtil_Traits<t_ALLOCATOR,
997 AlignType2 >::pointer Ptr2;
998 typedef typename AllocatorUtil_Traits<t_ALLOCATOR,
999 AlignType4 >::pointer Ptr4;
1000 typedef typename AllocatorUtil_Traits<t_ALLOCATOR,
1001 AlignType8 >::pointer Ptr8;
1002 typedef typename AllocatorUtil_Traits<t_ALLOCATOR,
1003 AlignType16 >::pointer Ptr16;
1004 typedef typename AllocatorUtil_Traits<t_ALLOCATOR,
1005 AlignTypeMax>::pointer PtrMax;
1006
1007 if (alignment > k_MAX_ALIGNMENT) {
1008 alignment = k_MAX_ALIGNMENT;
1009 }
1010
1011 std::size_t n = (nbytes + alignment - 1) / alignment;
1012
1013 switch (alignment) {
1014 case 1: deallocateObject(allocator, static_cast<Ptr1 >(p), n); break;
1015 case 2: deallocateObject(allocator, static_cast<Ptr2 >(p), n); break;
1016 case 4: deallocateObject(allocator, static_cast<Ptr4 >(p), n); break;
1017 case 8: deallocateObject(allocator, static_cast<Ptr8 >(p), n); break;
1018 case 16: deallocateObject(allocator, static_cast<Ptr16 >(p), n); break;
1019 default: deallocateObject(allocator, static_cast<PtrMax>(p), n); break;
1020 }
1021}
1022
1023template <class t_ALLOCATOR, class t_POINTER, class t_VALUE_TYPE>
1024inline
1025void AllocatorUtil::deallocateObjectImp(const t_ALLOCATOR& allocator,
1026 t_POINTER p,
1027 std::size_t n,
1028 const t_VALUE_TYPE& )
1029{
1030 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_VALUE_TYPE> Traits;
1031
1033
1034 typename Traits::allocator_type reboundAlloc(allocator);
1035 reboundAlloc.deallocate(p, n);
1036}
1037
1038template <class t_ALLOCATOR, class t_POINTER, class t_VALUE_TYPE>
1039inline
1040void AllocatorUtil::deleteObjectImp(const t_ALLOCATOR& allocator,
1041 t_POINTER p,
1042 const t_VALUE_TYPE& )
1043{
1044 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_VALUE_TYPE> Traits;
1045
1047
1048 typename Traits::allocator_type reboundAlloc(allocator);
1049 Traits::destroy(reboundAlloc, BSLS_UTIL_ADDRESSOF(*p));
1050 reboundAlloc.deallocate(p, 1);
1051}
1052
1053inline
1054bool AllocatorUtil::isPowerOf2(std::size_t alignment)
1055{
1056 return (0 < alignment) && (0 == (alignment & (alignment - 1)));
1057}
1058
1059
1060// CLASS METHODS
1061template <class t_ALLOC>
1062inline
1063typename bsl::enable_if<
1065 t_ALLOC>::type
1066AllocatorUtil::adapt(const t_ALLOC& from)
1067{
1068 return from;
1069}
1070
1071template <class t_TYPE>
1072inline
1074{
1075 return from.mechanism();
1076}
1077
1078template <class t_ALLOCATOR>
1079inline
1080typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer
1081AllocatorUtil::allocateBytes(const t_ALLOCATOR& allocator,
1082 std::size_t nbytes,
1083 std::size_t alignment)
1084{
1085 BSLS_ASSERT(isPowerOf2(alignment));
1086
1087 typedef
1088 typename AllocatorUtil_Traits<t_ALLOCATOR>::allocator_type StdAlloc;
1089 return allocateBytesImp(StdAlloc(allocator), nbytes, alignment);
1090}
1091
1092template <class t_TYPE, class t_ALLOCATOR>
1093inline
1094typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1095AllocatorUtil::allocateObject(const t_ALLOCATOR& allocator, std::size_t n)
1096{
1097 typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::allocator_type
1098 reboundAlloc(allocator);
1099 return reboundAlloc.allocate(n);
1100}
1101
1102template <class t_TYPE>
1103inline
1104t_TYPE& AllocatorUtil::assign(t_TYPE *lhs, const t_TYPE& rhs, bsl::false_type)
1105{
1106 BSLS_ASSERT(*lhs == rhs);
1107 (void)rhs;
1108 return *lhs;
1109}
1110
1111template <class t_TYPE>
1112inline
1113t_TYPE& AllocatorUtil::assign(t_TYPE *lhs, const t_TYPE& rhs, bsl::true_type)
1114{
1115 *lhs = rhs;
1116 return *lhs;
1117}
1118
1119template <class t_ALLOCATOR>
1120inline
1122 const t_ALLOCATOR& allocator,
1123 typename AllocatorUtil_Traits<t_ALLOCATOR>::void_pointer p,
1124 std::size_t nbytes,
1125 std::size_t alignment)
1126{
1127 BSLS_ASSERT(isPowerOf2(alignment));
1128
1129 typedef
1130 typename AllocatorUtil_Traits<t_ALLOCATOR>::allocator_type StdAlloc;
1131 deallocateBytesImp(StdAlloc(allocator), p, nbytes, alignment);
1132}
1133
1134template <class t_ALLOCATOR, class t_POINTER>
1135inline
1136void AllocatorUtil::deallocateObject(const t_ALLOCATOR& allocator,
1137 t_POINTER p,
1138 std::size_t n)
1139{
1140 BSLS_ASSERT(t_POINTER() != p);
1141 deallocateObjectImp(allocator, p, n, *p);
1142}
1143
1144template <class t_ALLOCATOR, class t_POINTER>
1145inline void
1146AllocatorUtil::deleteObject(const t_ALLOCATOR& allocator, t_POINTER p)
1147{
1148 BSLS_ASSERT(t_POINTER() != p);
1149 deleteObjectImp(allocator, p, *p);
1150}
1151
1152template <class t_TYPE, class t_ALLOCATOR>
1153inline
1154typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1155AllocatorUtil::newObject(const t_ALLOCATOR& allocator)
1156{
1157 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1158
1159 typename Traits::allocator_type reboundAlloc(allocator);
1160 typename Traits::pointer p = reboundAlloc.allocate(1);
1161 // Use a 'try' block because the proctor components are at a higher
1162 // dependency level than this component. As there is only one possibly
1163 // throwing statement, correctness of the 'try' block is easily verified.
1164 BSLS_TRY {
1165 Traits::construct(reboundAlloc, BSLS_UTIL_ADDRESSOF(*p));
1166 }
1167 BSLS_CATCH(...) {
1168 reboundAlloc.deallocate(p, 1);
1170 }
1171 return p;
1172}
1173
1174#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1175// {{{ BEGIN GENERATED CODE
1176// Command line: sim_cpp11_features.pl bslma_allocatorutil.h
1177#ifndef BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT
1178#define BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT 13
1179#endif
1180#ifndef BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B
1181#define BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT
1182#endif
1183# ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
1184#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 0
1185template <class t_TYPE, class t_ALLOCATOR, class t_ARG1>
1186inline
1187typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1188AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1189 t_ARG1& argument1)
1190{
1191 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1192
1193 typename Traits::allocator_type reboundAlloc(allocator);
1194 typename Traits::pointer p = reboundAlloc.allocate(1);
1195 BSLS_TRY {
1196 Traits::construct(reboundAlloc,
1198 argument1);
1199 }
1200 BSLS_CATCH(...) {
1201 reboundAlloc.deallocate(p, 1);
1203 }
1204 return p;
1205}
1206#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 0
1207
1208#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 1
1209template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01>
1210inline
1211typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1212AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1213 t_ARG1& argument1,
1214 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01)
1215{
1216 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1217
1218 typename Traits::allocator_type reboundAlloc(allocator);
1219 typename Traits::pointer p = reboundAlloc.allocate(1);
1220 BSLS_TRY {
1221 Traits::construct(reboundAlloc,
1223 argument1,
1224 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01));
1225 }
1226 BSLS_CATCH(...) {
1227 reboundAlloc.deallocate(p, 1);
1229 }
1230 return p;
1231}
1232#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 1
1233
1234#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 2
1235template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1236 class t_ARGS_02>
1237inline
1238typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1239AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1240 t_ARG1& argument1,
1241 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1242 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02)
1243{
1244 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1245
1246 typename Traits::allocator_type reboundAlloc(allocator);
1247 typename Traits::pointer p = reboundAlloc.allocate(1);
1248 BSLS_TRY {
1249 Traits::construct(reboundAlloc,
1251 argument1,
1252 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1253 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02));
1254 }
1255 BSLS_CATCH(...) {
1256 reboundAlloc.deallocate(p, 1);
1258 }
1259 return p;
1260}
1261#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 2
1262
1263#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 3
1264template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1265 class t_ARGS_02,
1266 class t_ARGS_03>
1267inline
1268typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1269AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1270 t_ARG1& argument1,
1271 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1272 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1273 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03)
1274{
1275 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1276
1277 typename Traits::allocator_type reboundAlloc(allocator);
1278 typename Traits::pointer p = reboundAlloc.allocate(1);
1279 BSLS_TRY {
1280 Traits::construct(reboundAlloc,
1282 argument1,
1283 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1284 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1285 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03));
1286 }
1287 BSLS_CATCH(...) {
1288 reboundAlloc.deallocate(p, 1);
1290 }
1291 return p;
1292}
1293#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 3
1294
1295#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 4
1296template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1297 class t_ARGS_02,
1298 class t_ARGS_03,
1299 class t_ARGS_04>
1300inline
1301typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1302AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1303 t_ARG1& argument1,
1304 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1305 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1306 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1307 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04)
1308{
1309 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1310
1311 typename Traits::allocator_type reboundAlloc(allocator);
1312 typename Traits::pointer p = reboundAlloc.allocate(1);
1313 BSLS_TRY {
1314 Traits::construct(reboundAlloc,
1316 argument1,
1317 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1318 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1319 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1320 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04));
1321 }
1322 BSLS_CATCH(...) {
1323 reboundAlloc.deallocate(p, 1);
1325 }
1326 return p;
1327}
1328#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 4
1329
1330#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 5
1331template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1332 class t_ARGS_02,
1333 class t_ARGS_03,
1334 class t_ARGS_04,
1335 class t_ARGS_05>
1336inline
1337typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1338AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1339 t_ARG1& argument1,
1340 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1341 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1342 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1343 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1344 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05)
1345{
1346 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1347
1348 typename Traits::allocator_type reboundAlloc(allocator);
1349 typename Traits::pointer p = reboundAlloc.allocate(1);
1350 BSLS_TRY {
1351 Traits::construct(reboundAlloc,
1353 argument1,
1354 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1355 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1356 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1357 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1358 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05));
1359 }
1360 BSLS_CATCH(...) {
1361 reboundAlloc.deallocate(p, 1);
1363 }
1364 return p;
1365}
1366#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 5
1367
1368#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 6
1369template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1370 class t_ARGS_02,
1371 class t_ARGS_03,
1372 class t_ARGS_04,
1373 class t_ARGS_05,
1374 class t_ARGS_06>
1375inline
1376typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1377AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1378 t_ARG1& argument1,
1379 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1380 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1381 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1382 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1383 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1384 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06)
1385{
1386 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1387
1388 typename Traits::allocator_type reboundAlloc(allocator);
1389 typename Traits::pointer p = reboundAlloc.allocate(1);
1390 BSLS_TRY {
1391 Traits::construct(reboundAlloc,
1393 argument1,
1394 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1395 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1396 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1397 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1398 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1399 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06));
1400 }
1401 BSLS_CATCH(...) {
1402 reboundAlloc.deallocate(p, 1);
1404 }
1405 return p;
1406}
1407#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 6
1408
1409#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 7
1410template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1411 class t_ARGS_02,
1412 class t_ARGS_03,
1413 class t_ARGS_04,
1414 class t_ARGS_05,
1415 class t_ARGS_06,
1416 class t_ARGS_07>
1417inline
1418typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1419AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1420 t_ARG1& argument1,
1421 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1422 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1423 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1424 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1425 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1426 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1427 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07)
1428{
1429 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1430
1431 typename Traits::allocator_type reboundAlloc(allocator);
1432 typename Traits::pointer p = reboundAlloc.allocate(1);
1433 BSLS_TRY {
1434 Traits::construct(reboundAlloc,
1436 argument1,
1437 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1438 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1439 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1440 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1441 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1442 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1443 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07));
1444 }
1445 BSLS_CATCH(...) {
1446 reboundAlloc.deallocate(p, 1);
1448 }
1449 return p;
1450}
1451#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 7
1452
1453#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 8
1454template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1455 class t_ARGS_02,
1456 class t_ARGS_03,
1457 class t_ARGS_04,
1458 class t_ARGS_05,
1459 class t_ARGS_06,
1460 class t_ARGS_07,
1461 class t_ARGS_08>
1462inline
1463typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1464AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1465 t_ARG1& argument1,
1466 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1467 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1468 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1469 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1470 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1471 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1472 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
1473 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08)
1474{
1475 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1476
1477 typename Traits::allocator_type reboundAlloc(allocator);
1478 typename Traits::pointer p = reboundAlloc.allocate(1);
1479 BSLS_TRY {
1480 Traits::construct(reboundAlloc,
1482 argument1,
1483 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1484 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1485 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1486 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1487 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1488 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1489 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
1490 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08));
1491 }
1492 BSLS_CATCH(...) {
1493 reboundAlloc.deallocate(p, 1);
1495 }
1496 return p;
1497}
1498#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 8
1499
1500#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 9
1501template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1502 class t_ARGS_02,
1503 class t_ARGS_03,
1504 class t_ARGS_04,
1505 class t_ARGS_05,
1506 class t_ARGS_06,
1507 class t_ARGS_07,
1508 class t_ARGS_08,
1509 class t_ARGS_09>
1510inline
1511typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1512AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1513 t_ARG1& argument1,
1514 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1515 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1516 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1517 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1518 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1519 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1520 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
1521 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
1522 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09)
1523{
1524 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1525
1526 typename Traits::allocator_type reboundAlloc(allocator);
1527 typename Traits::pointer p = reboundAlloc.allocate(1);
1528 BSLS_TRY {
1529 Traits::construct(reboundAlloc,
1531 argument1,
1532 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1533 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1534 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1535 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1536 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1537 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1538 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
1539 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
1540 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09));
1541 }
1542 BSLS_CATCH(...) {
1543 reboundAlloc.deallocate(p, 1);
1545 }
1546 return p;
1547}
1548#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 9
1549
1550#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 10
1551template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1552 class t_ARGS_02,
1553 class t_ARGS_03,
1554 class t_ARGS_04,
1555 class t_ARGS_05,
1556 class t_ARGS_06,
1557 class t_ARGS_07,
1558 class t_ARGS_08,
1559 class t_ARGS_09,
1560 class t_ARGS_10>
1561inline
1562typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1563AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1564 t_ARG1& argument1,
1565 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1566 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1567 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1568 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1569 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1570 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1571 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
1572 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
1573 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
1574 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10)
1575{
1576 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1577
1578 typename Traits::allocator_type reboundAlloc(allocator);
1579 typename Traits::pointer p = reboundAlloc.allocate(1);
1580 BSLS_TRY {
1581 Traits::construct(reboundAlloc,
1583 argument1,
1584 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1585 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1586 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1587 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1588 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1589 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1590 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
1591 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
1592 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
1593 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10));
1594 }
1595 BSLS_CATCH(...) {
1596 reboundAlloc.deallocate(p, 1);
1598 }
1599 return p;
1600}
1601#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 10
1602
1603#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 11
1604template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1605 class t_ARGS_02,
1606 class t_ARGS_03,
1607 class t_ARGS_04,
1608 class t_ARGS_05,
1609 class t_ARGS_06,
1610 class t_ARGS_07,
1611 class t_ARGS_08,
1612 class t_ARGS_09,
1613 class t_ARGS_10,
1614 class t_ARGS_11>
1615inline
1616typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1617AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1618 t_ARG1& argument1,
1619 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1620 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1621 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1622 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1623 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1624 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1625 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
1626 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
1627 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
1628 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
1629 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11)
1630{
1631 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1632
1633 typename Traits::allocator_type reboundAlloc(allocator);
1634 typename Traits::pointer p = reboundAlloc.allocate(1);
1635 BSLS_TRY {
1636 Traits::construct(reboundAlloc,
1638 argument1,
1639 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1640 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1641 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1642 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1643 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1644 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1645 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
1646 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
1647 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
1648 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10),
1649 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_11, arguments_11));
1650 }
1651 BSLS_CATCH(...) {
1652 reboundAlloc.deallocate(p, 1);
1654 }
1655 return p;
1656}
1657#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 11
1658
1659#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 12
1660template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1661 class t_ARGS_02,
1662 class t_ARGS_03,
1663 class t_ARGS_04,
1664 class t_ARGS_05,
1665 class t_ARGS_06,
1666 class t_ARGS_07,
1667 class t_ARGS_08,
1668 class t_ARGS_09,
1669 class t_ARGS_10,
1670 class t_ARGS_11,
1671 class t_ARGS_12>
1672inline
1673typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1674AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1675 t_ARG1& argument1,
1676 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1677 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1678 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1679 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1680 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1681 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1682 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
1683 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
1684 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
1685 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
1686 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
1687 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12)
1688{
1689 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1690
1691 typename Traits::allocator_type reboundAlloc(allocator);
1692 typename Traits::pointer p = reboundAlloc.allocate(1);
1693 BSLS_TRY {
1694 Traits::construct(reboundAlloc,
1696 argument1,
1697 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1698 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1699 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1700 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1701 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1702 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1703 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
1704 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
1705 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
1706 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10),
1707 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_11, arguments_11),
1708 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_12, arguments_12));
1709 }
1710 BSLS_CATCH(...) {
1711 reboundAlloc.deallocate(p, 1);
1713 }
1714 return p;
1715}
1716#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 12
1717
1718#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 13
1719template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1720 class t_ARGS_02,
1721 class t_ARGS_03,
1722 class t_ARGS_04,
1723 class t_ARGS_05,
1724 class t_ARGS_06,
1725 class t_ARGS_07,
1726 class t_ARGS_08,
1727 class t_ARGS_09,
1728 class t_ARGS_10,
1729 class t_ARGS_11,
1730 class t_ARGS_12,
1731 class t_ARGS_13>
1732inline
1733typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1734AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1735 t_ARG1& argument1,
1736 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1737 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1738 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1739 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1740 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1741 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
1742 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
1743 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
1744 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
1745 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
1746 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
1747 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12,
1748 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_13) arguments_13)
1749{
1750 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1751
1752 typename Traits::allocator_type reboundAlloc(allocator);
1753 typename Traits::pointer p = reboundAlloc.allocate(1);
1754 BSLS_TRY {
1755 Traits::construct(reboundAlloc,
1757 argument1,
1758 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1759 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1760 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1761 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1762 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1763 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
1764 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
1765 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
1766 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
1767 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10),
1768 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_11, arguments_11),
1769 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_12, arguments_12),
1770 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_13, arguments_13));
1771 }
1772 BSLS_CATCH(...) {
1773 reboundAlloc.deallocate(p, 1);
1775 }
1776 return p;
1777}
1778#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 13
1779
1780# endif
1781
1782#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 0
1783template <class t_TYPE, class t_ALLOCATOR, class t_ARG1>
1784inline
1785typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1786AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1787 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1)
1788{
1789 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1790
1791 typename Traits::allocator_type reboundAlloc(allocator);
1792 typename Traits::pointer p = reboundAlloc.allocate(1);
1793 BSLS_TRY {
1794 Traits::construct(reboundAlloc,
1796 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1));
1797 }
1798 BSLS_CATCH(...) {
1799 reboundAlloc.deallocate(p, 1);
1801 }
1802 return p;
1803}
1804#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 0
1805
1806#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 1
1807template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01>
1808inline
1809typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1810AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1811 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
1812 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01)
1813{
1814 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1815
1816 typename Traits::allocator_type reboundAlloc(allocator);
1817 typename Traits::pointer p = reboundAlloc.allocate(1);
1818 BSLS_TRY {
1819 Traits::construct(reboundAlloc,
1821 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
1822 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01));
1823 }
1824 BSLS_CATCH(...) {
1825 reboundAlloc.deallocate(p, 1);
1827 }
1828 return p;
1829}
1830#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 1
1831
1832#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 2
1833template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1834 class t_ARGS_02>
1835inline
1836typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1837AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1838 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
1839 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1840 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02)
1841{
1842 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1843
1844 typename Traits::allocator_type reboundAlloc(allocator);
1845 typename Traits::pointer p = reboundAlloc.allocate(1);
1846 BSLS_TRY {
1847 Traits::construct(reboundAlloc,
1849 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
1850 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1851 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02));
1852 }
1853 BSLS_CATCH(...) {
1854 reboundAlloc.deallocate(p, 1);
1856 }
1857 return p;
1858}
1859#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 2
1860
1861#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 3
1862template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1863 class t_ARGS_02,
1864 class t_ARGS_03>
1865inline
1866typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1867AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1868 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
1869 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1870 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1871 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03)
1872{
1873 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1874
1875 typename Traits::allocator_type reboundAlloc(allocator);
1876 typename Traits::pointer p = reboundAlloc.allocate(1);
1877 BSLS_TRY {
1878 Traits::construct(reboundAlloc,
1880 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
1881 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1882 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1883 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03));
1884 }
1885 BSLS_CATCH(...) {
1886 reboundAlloc.deallocate(p, 1);
1888 }
1889 return p;
1890}
1891#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 3
1892
1893#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 4
1894template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1895 class t_ARGS_02,
1896 class t_ARGS_03,
1897 class t_ARGS_04>
1898inline
1899typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1900AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1901 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
1902 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1903 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1904 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1905 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04)
1906{
1907 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1908
1909 typename Traits::allocator_type reboundAlloc(allocator);
1910 typename Traits::pointer p = reboundAlloc.allocate(1);
1911 BSLS_TRY {
1912 Traits::construct(reboundAlloc,
1914 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
1915 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1916 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1917 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1918 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04));
1919 }
1920 BSLS_CATCH(...) {
1921 reboundAlloc.deallocate(p, 1);
1923 }
1924 return p;
1925}
1926#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 4
1927
1928#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 5
1929template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1930 class t_ARGS_02,
1931 class t_ARGS_03,
1932 class t_ARGS_04,
1933 class t_ARGS_05>
1934inline
1935typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1936AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1937 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
1938 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1939 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1940 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1941 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1942 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05)
1943{
1944 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1945
1946 typename Traits::allocator_type reboundAlloc(allocator);
1947 typename Traits::pointer p = reboundAlloc.allocate(1);
1948 BSLS_TRY {
1949 Traits::construct(reboundAlloc,
1951 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
1952 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1953 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1954 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1955 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1956 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05));
1957 }
1958 BSLS_CATCH(...) {
1959 reboundAlloc.deallocate(p, 1);
1961 }
1962 return p;
1963}
1964#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 5
1965
1966#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 6
1967template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
1968 class t_ARGS_02,
1969 class t_ARGS_03,
1970 class t_ARGS_04,
1971 class t_ARGS_05,
1972 class t_ARGS_06>
1973inline
1974typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
1975AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
1976 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
1977 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
1978 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
1979 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
1980 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
1981 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
1982 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06)
1983{
1984 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
1985
1986 typename Traits::allocator_type reboundAlloc(allocator);
1987 typename Traits::pointer p = reboundAlloc.allocate(1);
1988 BSLS_TRY {
1989 Traits::construct(reboundAlloc,
1991 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
1992 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
1993 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
1994 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
1995 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
1996 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
1997 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06));
1998 }
1999 BSLS_CATCH(...) {
2000 reboundAlloc.deallocate(p, 1);
2002 }
2003 return p;
2004}
2005#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 6
2006
2007#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 7
2008template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2009 class t_ARGS_02,
2010 class t_ARGS_03,
2011 class t_ARGS_04,
2012 class t_ARGS_05,
2013 class t_ARGS_06,
2014 class t_ARGS_07>
2015inline
2016typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2017AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2018 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2019 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2020 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2021 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2022 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2023 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2024 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2025 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07)
2026{
2027 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2028
2029 typename Traits::allocator_type reboundAlloc(allocator);
2030 typename Traits::pointer p = reboundAlloc.allocate(1);
2031 BSLS_TRY {
2032 Traits::construct(reboundAlloc,
2034 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2035 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2036 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2037 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2038 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2039 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2040 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2041 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07));
2042 }
2043 BSLS_CATCH(...) {
2044 reboundAlloc.deallocate(p, 1);
2046 }
2047 return p;
2048}
2049#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 7
2050
2051#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 8
2052template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2053 class t_ARGS_02,
2054 class t_ARGS_03,
2055 class t_ARGS_04,
2056 class t_ARGS_05,
2057 class t_ARGS_06,
2058 class t_ARGS_07,
2059 class t_ARGS_08>
2060inline
2061typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2062AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2063 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2064 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2065 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2066 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2067 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2068 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2069 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2070 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
2071 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08)
2072{
2073 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2074
2075 typename Traits::allocator_type reboundAlloc(allocator);
2076 typename Traits::pointer p = reboundAlloc.allocate(1);
2077 BSLS_TRY {
2078 Traits::construct(reboundAlloc,
2080 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2081 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2082 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2083 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2084 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2085 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2086 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2087 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
2088 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08));
2089 }
2090 BSLS_CATCH(...) {
2091 reboundAlloc.deallocate(p, 1);
2093 }
2094 return p;
2095}
2096#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 8
2097
2098#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 9
2099template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2100 class t_ARGS_02,
2101 class t_ARGS_03,
2102 class t_ARGS_04,
2103 class t_ARGS_05,
2104 class t_ARGS_06,
2105 class t_ARGS_07,
2106 class t_ARGS_08,
2107 class t_ARGS_09>
2108inline
2109typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2110AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2111 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2112 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2113 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2114 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2115 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2116 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2117 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2118 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
2119 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
2120 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09)
2121{
2122 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2123
2124 typename Traits::allocator_type reboundAlloc(allocator);
2125 typename Traits::pointer p = reboundAlloc.allocate(1);
2126 BSLS_TRY {
2127 Traits::construct(reboundAlloc,
2129 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2130 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2131 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2132 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2133 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2134 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2135 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2136 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
2137 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
2138 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09));
2139 }
2140 BSLS_CATCH(...) {
2141 reboundAlloc.deallocate(p, 1);
2143 }
2144 return p;
2145}
2146#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 9
2147
2148#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 10
2149template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2150 class t_ARGS_02,
2151 class t_ARGS_03,
2152 class t_ARGS_04,
2153 class t_ARGS_05,
2154 class t_ARGS_06,
2155 class t_ARGS_07,
2156 class t_ARGS_08,
2157 class t_ARGS_09,
2158 class t_ARGS_10>
2159inline
2160typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2161AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2162 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2163 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2164 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2165 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2166 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2167 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2168 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2169 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
2170 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
2171 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
2172 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10)
2173{
2174 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2175
2176 typename Traits::allocator_type reboundAlloc(allocator);
2177 typename Traits::pointer p = reboundAlloc.allocate(1);
2178 BSLS_TRY {
2179 Traits::construct(reboundAlloc,
2181 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2182 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2183 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2184 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2185 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2186 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2187 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2188 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
2189 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
2190 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
2191 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10));
2192 }
2193 BSLS_CATCH(...) {
2194 reboundAlloc.deallocate(p, 1);
2196 }
2197 return p;
2198}
2199#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 10
2200
2201#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 11
2202template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2203 class t_ARGS_02,
2204 class t_ARGS_03,
2205 class t_ARGS_04,
2206 class t_ARGS_05,
2207 class t_ARGS_06,
2208 class t_ARGS_07,
2209 class t_ARGS_08,
2210 class t_ARGS_09,
2211 class t_ARGS_10,
2212 class t_ARGS_11>
2213inline
2214typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2215AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2216 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2217 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2218 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2219 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2220 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2221 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2222 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2223 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
2224 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
2225 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
2226 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
2227 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11)
2228{
2229 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2230
2231 typename Traits::allocator_type reboundAlloc(allocator);
2232 typename Traits::pointer p = reboundAlloc.allocate(1);
2233 BSLS_TRY {
2234 Traits::construct(reboundAlloc,
2236 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2237 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2238 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2239 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2240 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2241 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2242 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2243 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
2244 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
2245 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
2246 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10),
2247 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_11, arguments_11));
2248 }
2249 BSLS_CATCH(...) {
2250 reboundAlloc.deallocate(p, 1);
2252 }
2253 return p;
2254}
2255#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 11
2256
2257#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 12
2258template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2259 class t_ARGS_02,
2260 class t_ARGS_03,
2261 class t_ARGS_04,
2262 class t_ARGS_05,
2263 class t_ARGS_06,
2264 class t_ARGS_07,
2265 class t_ARGS_08,
2266 class t_ARGS_09,
2267 class t_ARGS_10,
2268 class t_ARGS_11,
2269 class t_ARGS_12>
2270inline
2271typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2272AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2273 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2274 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2275 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2276 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2277 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2278 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2279 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2280 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
2281 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
2282 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
2283 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
2284 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
2285 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12)
2286{
2287 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2288
2289 typename Traits::allocator_type reboundAlloc(allocator);
2290 typename Traits::pointer p = reboundAlloc.allocate(1);
2291 BSLS_TRY {
2292 Traits::construct(reboundAlloc,
2294 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2295 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2296 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2297 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2298 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2299 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2300 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2301 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
2302 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
2303 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
2304 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10),
2305 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_11, arguments_11),
2306 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_12, arguments_12));
2307 }
2308 BSLS_CATCH(...) {
2309 reboundAlloc.deallocate(p, 1);
2311 }
2312 return p;
2313}
2314#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 12
2315
2316#if BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 13
2317template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class t_ARGS_01,
2318 class t_ARGS_02,
2319 class t_ARGS_03,
2320 class t_ARGS_04,
2321 class t_ARGS_05,
2322 class t_ARGS_06,
2323 class t_ARGS_07,
2324 class t_ARGS_08,
2325 class t_ARGS_09,
2326 class t_ARGS_10,
2327 class t_ARGS_11,
2328 class t_ARGS_12,
2329 class t_ARGS_13>
2330inline
2331typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2332AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2333 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2334 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) arguments_01,
2335 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) arguments_02,
2336 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) arguments_03,
2337 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) arguments_04,
2338 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) arguments_05,
2339 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) arguments_06,
2340 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) arguments_07,
2341 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) arguments_08,
2342 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) arguments_09,
2343 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) arguments_10,
2344 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_11) arguments_11,
2345 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_12) arguments_12,
2346 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_13) arguments_13)
2347{
2348 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2349
2350 typename Traits::allocator_type reboundAlloc(allocator);
2351 typename Traits::pointer p = reboundAlloc.allocate(1);
2352 BSLS_TRY {
2353 Traits::construct(reboundAlloc,
2355 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2356 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_01, arguments_01),
2357 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_02, arguments_02),
2358 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_03, arguments_03),
2359 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_04, arguments_04),
2360 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_05, arguments_05),
2361 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_06, arguments_06),
2362 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_07, arguments_07),
2363 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_08, arguments_08),
2364 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_09, arguments_09),
2365 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_10, arguments_10),
2366 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_11, arguments_11),
2367 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_12, arguments_12),
2368 BSLS_COMPILERFEATURES_FORWARD(t_ARGS_13, arguments_13));
2369 }
2370 BSLS_CATCH(...) {
2371 reboundAlloc.deallocate(p, 1);
2373 }
2374 return p;
2375}
2376#endif // BSLMA_ALLOCATORUTIL_VARIADIC_LIMIT_B >= 13
2377
2378#else
2379// The generated code below is a workaround for the absence of perfect
2380// forwarding in some compilers.
2381# ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
2382template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class... t_ARGS>
2383inline
2384typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2385AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2386 t_ARG1& argument1,
2387 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... arguments)
2388{
2389 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2390
2391 typename Traits::allocator_type reboundAlloc(allocator);
2392 typename Traits::pointer p = reboundAlloc.allocate(1);
2393 BSLS_TRY {
2394 Traits::construct(reboundAlloc,
2396 argument1,
2397 BSLS_COMPILERFEATURES_FORWARD(t_ARGS, arguments)...);
2398 }
2399 BSLS_CATCH(...) {
2400 reboundAlloc.deallocate(p, 1);
2402 }
2403 return p;
2404}
2405# endif
2406
2407template <class t_TYPE, class t_ALLOCATOR, class t_ARG1, class... t_ARGS>
2408inline
2409typename AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
2410AllocatorUtil::newObject(const t_ALLOCATOR& allocator,
2411 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG1) argument1,
2412 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... arguments)
2413{
2414 typedef AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE> Traits;
2415
2416 typename Traits::allocator_type reboundAlloc(allocator);
2417 typename Traits::pointer p = reboundAlloc.allocate(1);
2418 BSLS_TRY {
2419 Traits::construct(reboundAlloc,
2421 BSLS_COMPILERFEATURES_FORWARD(t_ARG1, argument1),
2422 BSLS_COMPILERFEATURES_FORWARD(t_ARGS, arguments)...);
2423 }
2424 BSLS_CATCH(...) {
2425 reboundAlloc.deallocate(p, 1);
2427 }
2428 return p;
2429}
2430// }}} END GENERATED CODE
2431#endif
2432
2433template <class t_TYPE>
2434inline
2435void AllocatorUtil::swap(t_TYPE *pa, t_TYPE *pb, bsl::false_type)
2436{
2437 BSLS_ASSERT(*pa == *pb);
2438 (void)pa; (void)pb;
2439}
2440
2441template <class t_TYPE>
2442inline
2443void AllocatorUtil::swap(t_TYPE *pa, t_TYPE *pb, bsl::true_type)
2444{
2445 using std::swap;
2446 swap(*pa, *pb);
2447}
2448
2449} // close package namespace
2450
2451
2452#else // if ! defined(DEFINED_BSLMA_ALLOCATORUTIL_H)
2453# error Not valid except when included from bslma_allocatorutil.h
2454#endif // ! defined(COMPILING_BSLMA_ALLOCATORUTIL_H)
2455
2456#endif // ! defined(INCLUDED_BSLMA_ALLOCATORUTIL_CPP03)
2457
2458// ----------------------------------------------------------------------------
2459// Copyright 2022 Bloomberg Finance L.P.
2460//
2461// Licensed under the Apache License, Version 2.0 (the "License");
2462// you may not use this file except in compliance with the License.
2463// You may obtain a copy of the License at
2464//
2465// http://www.apache.org/licenses/LICENSE-2.0
2466//
2467// Unless required by applicable law or agreed to in writing, software
2468// distributed under the License is distributed on an "AS IS" BASIS,
2469// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2470// See the License for the specific language governing permissions and
2471// limitations under the License.
2472// ----------------------------- END-OF-FILE ----------------------------------
2473
2474/** @} */
2475/** @} */
2476/** @} */
Definition bslma_bslallocator.h:580
BloombergLP::bslma::Allocator * mechanism() const
Definition bslma_bslallocator.h:1126
Definition bslma_memoryresource.h:441
BSLS_ANNOTATION_NODISCARD void * allocate(size_t bytes, size_t alignment=k_MAX_ALIGN)
Definition bslma_memoryresource.h:541
void deallocate(void *p, size_t bytes, size_t alignment=k_MAX_ALIGN)
Definition bslma_memoryresource.h:547
Definition bslma_polymorphicallocator.h:452
memory_resource * resource() const
Return the address of the memory resource supplied on construction.
Definition bslma_polymorphicallocator.h:1048
Definition bslma_allocator.h:457
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
static const bool value
Definition bslmf_integralconstant.h:258
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_CATCH(X)
Definition bsls_exceptionutil.h:372
#define BSLS_TRY
Definition bsls_exceptionutil.h:370
#define BSLS_RETHROW
Definition bsls_exceptionutil.h:378
#define BSLS_UTIL_ADDRESSOF(OBJ)
Definition bsls_util.h:289
Definition balxml_encoderoptions.h:68
void swap(TYPE &a, TYPE &b)
Definition bslma_allocatortraits.h:1061
Definition bslmf_conditional.h:120
Definition bslmf_enableif.h:525
Definition bslmf_integralconstant.h:244
Definition bslmf_isconst.h:144
Definition bslmf_isconvertible.h:867
Definition bslmf_issame.h:146
Definition bslmf_isvolatile.h:144
static bsl::enable_if<!IsDerivedFromBslAllocator< t_ALLOC >::value, t_ALLOC >::type adapt(const t_ALLOC &from)
Definition bslma_allocatorutil.h:856
static AllocatorUtil_Traits< t_ALLOCATOR, t_TYPE >::pointer newObject(const t_ALLOCATOR &allocator)
Definition bslma_allocatorutil.h:945
static AllocatorUtil_Traits< t_ALLOCATOR, t_TYPE >::pointer allocateObject(const t_ALLOCATOR &allocator, std::size_t n=1)
Definition bslma_allocatorutil.h:885
static void swap(t_TYPE *pa, t_TYPE *pb, bsl::false_type allowed)
Definition bslma_allocatorutil.h:1024
static void deallocateBytes(const t_ALLOCATOR &allocator, typename AllocatorUtil_Traits< t_ALLOCATOR >::void_pointer p, std::size_t nbytes, std::size_t alignment=k_MAX_ALIGNMENT)
Definition bslma_allocatorutil.h:911
static void deleteObject(const t_ALLOCATOR &allocator, t_POINTER p)
Definition bslma_allocatorutil.h:936
static AllocatorUtil_Traits< t_ALLOCATOR >::void_pointer allocateBytes(const t_ALLOCATOR &allocator, std::size_t nbytes, std::size_t alignment=k_MAX_ALIGNMENT)
Definition bslma_allocatorutil.h:871
static t_TYPE & assign(t_TYPE *lhs, const t_TYPE &rhs, bsl::true_type allowed)
Definition bslma_allocatorutil.h:903
static void deallocateObject(const t_ALLOCATOR &allocator, t_POINTER p, std::size_t n=1)
Definition bslma_allocatorutil.h:926
AlignmentImpPriorityToType< PRIORITY >::Type Type
Definition bsls_alignmenttotype.h:394
@ BSLS_MAX_ALIGNMENT
Definition bsls_alignmentutil.h:275