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