BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslma_polymorphicallocator_cpp03.h
Go to the documentation of this file.
1/// @file bslma_polymorphicallocator_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslma_polymorphicallocator_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLMA_POLYMORPHICALLOCATOR_CPP03
12#define INCLUDED_BSLMA_POLYMORPHICALLOCATOR_CPP03
13
14/// @defgroup bslma_polymorphicallocator_cpp03 bslma_polymorphicallocator_cpp03
15/// @brief Provide C++03 implementation for bslma_polymorphicallocator.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslma
19/// @{
20/// @addtogroup bslma_polymorphicallocator_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslma_polymorphicallocator_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslma_polymorphicallocator_cpp03-classes"> Classes </a>
26/// * <a href="#bslma_polymorphicallocator_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslma_polymorphicallocator_cpp03-purpose}
29/// Provide C++03 implementation for bslma_polymorphicallocator.h
30///
31/// # Classes {#bslma_polymorphicallocator_cpp03-classes}
32/// See bslma_polymorphicallocator.h for list of classes
33///
34/// @see bslma_polymorphicallocator
35///
36/// # Description {#bslma_polymorphicallocator_cpp03-description}
37/// This component is the C++03 translation of a C++11 component,
38/// generated by the 'sim_cpp11_features.pl' program. If the original header
39/// contains any specially delimited regions of C++11 code, then this generated
40/// file contains the C++03 equivalent, i.e., with variadic templates expanded
41/// and rvalue-references replaced by 'bslmf::MovableRef' objects. The header
42/// code in this file is designed to be '#include'd into the original header
43/// when compiling with a C++03 compiler. If there are no specially delimited
44/// regions of C++11 code, then this header contains no code and is not
45/// '#include'd in the original header.
46///
47/// Generated on Sun Sep 1 09:58:46 2024
48/// Command line: sim_cpp11_features.pl bslma_polymorphicallocator.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslma
57 * @{
58 */
59/** @addtogroup bslma_polymorphicallocator_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLMA_POLYMORPHICALLOCATOR_H
64
65#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
66// Use `polymorphic_allocator` from native C++17 library, if available.
67
68# include <memory_resource>
69
70namespace bsl {
71
72// Import 'polymorphic_allocator' into the 'bsl' namespace.
73template <class TYPE = std::byte>
74using polymorphic_allocator = std::pmr::polymorphic_allocator<TYPE>;
75
76} // close namespace bsl
77
78// FREE FUNCTIONS
79
80// As per issue LWG 3683 (https://cplusplus.github.io/LWG/issue3683), the C++20
81// standard as published does not provide `operator==` for comparing a
82// `polymorphic_allocator` to a type convertible to `polymorphic_allocator`,
83// e.g., a `pmr::memory_resource`. The workaround below corresponds to
84// proposed resolution 2, which differs from the accepted issue resolution
85// (proposed resolution 3) because the accepted resolution requires modifying
86// the library class itself. This workaround does not depend on C++20
87// automatic generation of multiple `operator==` and `operator!=` from a single
88// declaration of `operator==`. Because `bsl::polymorphic_allocator` is an
89// alias for `std::pmr::polymorphic_allocator`, these operators must be defined
90// in namespace `std::pmr` to be found by ADL.
91
92
93
94#if defined(BSLS_PLATFORM_CMP_MSVC)
95// The MSVC compiler, up to and including version 19.33 (aka VS 2022), has a
96// bug whereby supressing argument deduction using @ref type_identity causes a
97// linker error. The `BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T` macro below
98// provides a non-deduced `polymorphic_allocator` argument that works around
99// this problem.
100//
101// Note that this workaround will not work for a type convertible to
102// `polymorphic_allocator` via a conversion operator:
103//..
104// class C { operator bsl::polymorphic_allocator<short>() const; };
105// assert(bsl::polymorphic_allocator<short>() == C()); // won`t compile
106//..
107// As this is a rare-to-nonexistant use case, we won`t bother to fix that for
108// now.
109
110struct PolymorphicAllocator_Unique
111{
112 // A unique type not used for anything else
113};
114
115#define BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(VAL_T) \
116 std::pmr::polymorphic_allocator< \
117 BloombergLP::bslma::PolymorphicAllocator_Unique>
118
119#else // Not MSVC compiler
120
121#define BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(VAL_T) \
122 typename bsl::type_identity<std::pmr::polymorphic_allocator<VAL_T>>::type
123
124#endif
125
126
127
128namespace std::pmr {
129
130/// Return `true` if the specified `a` and specified `b` polymorphic
131/// allocators have equal memory resources; otherwise `false`.
132template <class TYPE>
133bool operator==(const polymorphic_allocator<TYPE>& a,
134 const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& b)
136
137/// Return `true` if the specified `a` and specified `b` polymorphic
138/// allocators have equal memory resources; otherwise `false`.
139template <class TYPE>
140bool operator==(const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& a,
141 const polymorphic_allocator<TYPE>& b)
143
144/// Return `false` if the specified `a` and specified `b` polymorphic
145/// allocators have equal memory resources; otherwise `true`.
146template <class TYPE>
147bool operator!=(const polymorphic_allocator<TYPE>& a,
148 const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& b)
150
151/// Return `false` if the specified `a` and specified `b` polymorphic
152/// allocators have equal memory resources; otherwise `true`.
153template <class TYPE>
154bool operator!=(const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& a,
155 const polymorphic_allocator<TYPE>& b)
157
158} // close namespace std::pmr
159
160#else // If C++17 library is not available
161
162 // =========================================
163 // class template bsl::polymorphic_allocator
164 // =========================================
165
166namespace bsl {
167
168/// An STL-compatible proxy for any resource class derived from
169/// `bsl::memory_resource`. This class template is a pre-C++17
170/// implementation of `std::pmr::polymorphic_allocator` from the C++17
171/// Standard Library. Note that there are a number of methods (e.g.,
172/// @ref max_size ) that are not in the C++17 version of this class. These
173/// members exist for compatibility with C++03 versions of the standard
174/// library, which don't use `allocator_traits`.
175///
176/// See @ref bslma_polymorphicallocator_cpp03
177template <class TYPE = unsigned char>
178class polymorphic_allocator {
179
180 // DATA
181 memory_resource *d_resource;
182
183 // NOT IMPLEMENTED
186
187 public:
188 // TYPES
189 typedef std::size_t size_type;
190 typedef std::ptrdiff_t difference_type;
191 typedef TYPE *pointer;
192 typedef const TYPE *const_pointer;
193 typedef TYPE& reference;
194 typedef const TYPE& const_reference;
195 typedef TYPE value_type;
196
197 /// This nested `struct` template, parameterized by `ANY_TYPE`, provides
198 /// a namespace for an `other` type alias, which is an allocator type
199 /// following the same template as this one but that allocates elements
200 /// of `ANY_TYPE`. Note that this allocator type is convertible to and
201 /// from `other` for any type, including `void`.
202 template <class ANY_TYPE>
203 struct rebind {
204 typedef polymorphic_allocator<ANY_TYPE> other;
205 };
206
207 // CREATORS
208
209 /// Create an allocator that will forward allocation calls to the
210 /// object pointed to by `bslma::Default::defaultAllocator()`.
211 /// Postcondition:
212 /// @code
213 /// this->resource() == bslma::Default::defaultAllocator()
214 /// @endcode
215 /// Note that in this C++03 implementation, the default memory resource
216 /// is the same as `bslma::Default::defaultAllocator()`.
218
219 /// Convert a `memory_resource` pointer to a `polymorphic_allocator`
220 /// object that forwards allocation calls to the object pointed to by
221 /// the specified `r`. Postcondition:
222 /// @code
223 /// this->resource() == r
224 /// @endcode
225 /// The behavior is undefined if `r` is null.
226 polymorphic_allocator(memory_resource *r); // IMPLICIT
227
228 /// Create an allocator sharing the same resource object as the
229 /// specified `original`. The newly constructed allocator will compare
230 /// equal to `original`, even though they may be instantiated on
231 /// different types. Postconditions:
232 /// @code
233 /// *this == original
234 /// this->resource() == original.resource();
235 /// @endcode
236#ifdef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
238 BSLS_KEYWORD_NOEXCEPT = default;
239#else
242#endif
243 template<class ANY_TYPE>
244 polymorphic_allocator(const polymorphic_allocator<ANY_TYPE>& original)
246
247 /// Destroy this object. Note that this does not delete the object
248 /// pointed to by 'resource()'.
249 ~polymorphic_allocator() = default;
250
251 // MANIPULATORS
252
253 /// Return a block of memory having sufficient size and alignment to
254 /// hold the specified `n` objects of `value_type`, allocated from the
255 /// memory resource held by this allocator.
256 BSLS_ANNOTATION_NODISCARD TYPE *allocate(std::size_t n);
257
258#ifndef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
259 /// Return a block of memory having sufficient size and alignment to
260 /// hold the specified `n` objects of `value_type`, allocated from the
261 /// memory resource held by this allocator, ignoring the specified
262 /// `hint`, which is used by other allocators as a locality hint. Note
263 /// that this overload is not part of C++17
264 /// `std::pmr::polymorphic_allocator` but it is a requirement for all
265 /// C++03 allocators.
266 BSLS_ANNOTATION_NODISCARD TYPE *allocate(std::size_t n, const void *hint);
267#endif
268
269 /// Deallocate a block of memory having sufficient size and alignment to
270 /// hold the specified `n` objects of `value_type` by returning it to
271 /// the memory resource held by this allocator. The behavior is
272 /// undefined unless `p` is the address of a block previously allocated
273 /// by a call to `allocate` with the same `n` and not yet deallocated.
274 void deallocate(TYPE *p, std::size_t n);
275
276 /// Create a default-constructed object of (template parameter)
277 /// `ELEMENT_TYPE` at the specified `address`. If `ELEMENT_TYPE`
278 /// supports `bslma`-style allocation, this allocator passes itself to
279 /// the extended default constructor. If the constructor throws, the
280 /// memory at `address` is left in an unspecified state. The behavior
281 /// is undefined unless `address` refers to a block of memory having
282 /// sufficient size and alignment for an object of `ELEMENT_TYPE`.
283 template <class ELEMENT_TYPE>
284 void construct(ELEMENT_TYPE *address);
285
286 /// Create an object of (template parameter) `ELEMENT_TYPE` at the
287 /// specified `address`, constructed by forwarding the specified
288 /// `argument1` and the (variable number of) additional specified
289 /// `arguments` to the corresponding constructor of `ELEMENT_TYPE`. If
290 /// `ELEMENT_TYPE` supports `bslma`-style allocation, this allocator
291 /// passes itself to the constructor. If the constructor throws, the
292 /// memory at `address` is left in an unspecified state. Note that, in
293 /// C++03, perfect forwarding is limited such that any lvalue reference
294 /// in the `arguments` parameter pack is const-qualified when forwarded
295 /// to the `ELEMENT_TYPE` constructor; only `argument1` can be forwarded
296 /// as an unqualified lvalue. The behavior is undefined unless
297 /// `address` refers to a block of memory having sufficient size and
298 /// alignment for an object of `ELEMENT_TYPE`.
299#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
300// {{{ BEGIN GENERATED CODE
301// Command line: sim_cpp11_features.pl bslma_polymorphicallocator.h
302#ifndef BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT
303#define BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT 14
304#endif
305#ifndef BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A
306#define BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT
307#endif
308#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 0
309 template <class ELEMENT_TYPE, class ARG1>
310 void construct(ELEMENT_TYPE *address,
311 ARG1& argument1);
312#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 0
313
314#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 1
315 template <class ELEMENT_TYPE, class ARG1, class ARGS_01>
316 void construct(ELEMENT_TYPE *address,
317 ARG1& argument1,
318 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01);
319#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 1
320
321#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 2
322 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
323 class ARGS_02>
324 void construct(ELEMENT_TYPE *address,
325 ARG1& argument1,
326 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
327 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02);
328#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 2
329
330#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 3
331 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
332 class ARGS_02,
333 class ARGS_03>
334 void construct(ELEMENT_TYPE *address,
335 ARG1& argument1,
336 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
337 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
338 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03);
339#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 3
340
341#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 4
342 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
343 class ARGS_02,
344 class ARGS_03,
345 class ARGS_04>
346 void construct(ELEMENT_TYPE *address,
347 ARG1& argument1,
348 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
349 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
350 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
351 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04);
352#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 4
353
354#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 5
355 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
356 class ARGS_02,
357 class ARGS_03,
358 class ARGS_04,
359 class ARGS_05>
360 void construct(ELEMENT_TYPE *address,
361 ARG1& argument1,
362 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
363 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
364 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
365 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
366 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05);
367#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 5
368
369#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 6
370 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
371 class ARGS_02,
372 class ARGS_03,
373 class ARGS_04,
374 class ARGS_05,
375 class ARGS_06>
376 void construct(ELEMENT_TYPE *address,
377 ARG1& argument1,
378 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
379 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
380 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
381 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
382 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
383 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06);
384#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 6
385
386#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 7
387 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
388 class ARGS_02,
389 class ARGS_03,
390 class ARGS_04,
391 class ARGS_05,
392 class ARGS_06,
393 class ARGS_07>
394 void construct(ELEMENT_TYPE *address,
395 ARG1& argument1,
396 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
397 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
398 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
399 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
400 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
401 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
402 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07);
403#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 7
404
405#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 8
406 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
407 class ARGS_02,
408 class ARGS_03,
409 class ARGS_04,
410 class ARGS_05,
411 class ARGS_06,
412 class ARGS_07,
413 class ARGS_08>
414 void construct(ELEMENT_TYPE *address,
415 ARG1& argument1,
416 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
417 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
418 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
419 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
420 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
421 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
422 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
423 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08);
424#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 8
425
426#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 9
427 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
428 class ARGS_02,
429 class ARGS_03,
430 class ARGS_04,
431 class ARGS_05,
432 class ARGS_06,
433 class ARGS_07,
434 class ARGS_08,
435 class ARGS_09>
436 void construct(ELEMENT_TYPE *address,
437 ARG1& argument1,
438 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
439 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
440 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
441 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
442 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
443 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
444 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
445 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
446 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09);
447#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 9
448
449#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 10
450 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
451 class ARGS_02,
452 class ARGS_03,
453 class ARGS_04,
454 class ARGS_05,
455 class ARGS_06,
456 class ARGS_07,
457 class ARGS_08,
458 class ARGS_09,
459 class ARGS_10>
460 void construct(ELEMENT_TYPE *address,
461 ARG1& argument1,
462 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
463 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
464 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
465 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
466 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
467 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
468 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
469 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
470 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
471 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10);
472#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 10
473
474#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 11
475 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
476 class ARGS_02,
477 class ARGS_03,
478 class ARGS_04,
479 class ARGS_05,
480 class ARGS_06,
481 class ARGS_07,
482 class ARGS_08,
483 class ARGS_09,
484 class ARGS_10,
485 class ARGS_11>
486 void construct(ELEMENT_TYPE *address,
487 ARG1& argument1,
488 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
489 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
490 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
491 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
492 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
493 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
494 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
495 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
496 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
497 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
498 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11);
499#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 11
500
501#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 12
502 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
503 class ARGS_02,
504 class ARGS_03,
505 class ARGS_04,
506 class ARGS_05,
507 class ARGS_06,
508 class ARGS_07,
509 class ARGS_08,
510 class ARGS_09,
511 class ARGS_10,
512 class ARGS_11,
513 class ARGS_12>
514 void construct(ELEMENT_TYPE *address,
515 ARG1& argument1,
516 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
517 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
518 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
519 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
520 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
521 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
522 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
523 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
524 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
525 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
526 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
527 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12);
528#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 12
529
530#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 13
531 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
532 class ARGS_02,
533 class ARGS_03,
534 class ARGS_04,
535 class ARGS_05,
536 class ARGS_06,
537 class ARGS_07,
538 class ARGS_08,
539 class ARGS_09,
540 class ARGS_10,
541 class ARGS_11,
542 class ARGS_12,
543 class ARGS_13>
544 void construct(ELEMENT_TYPE *address,
545 ARG1& argument1,
546 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
547 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
548 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
549 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
550 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
551 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
552 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
553 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
554 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
555 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
556 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
557 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
558 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13);
559#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 13
560
561#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 14
562 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
563 class ARGS_02,
564 class ARGS_03,
565 class ARGS_04,
566 class ARGS_05,
567 class ARGS_06,
568 class ARGS_07,
569 class ARGS_08,
570 class ARGS_09,
571 class ARGS_10,
572 class ARGS_11,
573 class ARGS_12,
574 class ARGS_13,
575 class ARGS_14>
576 void construct(ELEMENT_TYPE *address,
577 ARG1& argument1,
578 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
579 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
580 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
581 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
582 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
583 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
584 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
585 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
586 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
587 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
588 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
589 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
590 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13,
591 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) arguments_14);
592#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 14
593
594#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 0
595 template <class ELEMENT_TYPE, class ARG1>
596 void construct(ELEMENT_TYPE *address,
597 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1);
598#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 0
599
600#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 1
601 template <class ELEMENT_TYPE, class ARG1, class ARGS_01>
602 void construct(ELEMENT_TYPE *address,
603 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
604 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01);
605#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 1
606
607#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 2
608 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
609 class ARGS_02>
610 void construct(ELEMENT_TYPE *address,
611 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
612 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
613 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02);
614#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 2
615
616#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 3
617 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
618 class ARGS_02,
619 class ARGS_03>
620 void construct(ELEMENT_TYPE *address,
621 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
622 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
623 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
624 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03);
625#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 3
626
627#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 4
628 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
629 class ARGS_02,
630 class ARGS_03,
631 class ARGS_04>
632 void construct(ELEMENT_TYPE *address,
633 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
634 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
635 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
636 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
637 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04);
638#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 4
639
640#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 5
641 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
642 class ARGS_02,
643 class ARGS_03,
644 class ARGS_04,
645 class ARGS_05>
646 void construct(ELEMENT_TYPE *address,
647 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
648 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
649 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
650 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
651 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
652 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05);
653#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 5
654
655#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 6
656 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
657 class ARGS_02,
658 class ARGS_03,
659 class ARGS_04,
660 class ARGS_05,
661 class ARGS_06>
662 void construct(ELEMENT_TYPE *address,
663 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
664 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
665 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
666 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
667 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
668 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
669 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06);
670#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 6
671
672#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 7
673 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
674 class ARGS_02,
675 class ARGS_03,
676 class ARGS_04,
677 class ARGS_05,
678 class ARGS_06,
679 class ARGS_07>
680 void construct(ELEMENT_TYPE *address,
681 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
682 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
683 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
684 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
685 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
686 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
687 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
688 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07);
689#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 7
690
691#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 8
692 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
693 class ARGS_02,
694 class ARGS_03,
695 class ARGS_04,
696 class ARGS_05,
697 class ARGS_06,
698 class ARGS_07,
699 class ARGS_08>
700 void construct(ELEMENT_TYPE *address,
701 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
702 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
703 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
704 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
705 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
706 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
707 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
708 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
709 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08);
710#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 8
711
712#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 9
713 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
714 class ARGS_02,
715 class ARGS_03,
716 class ARGS_04,
717 class ARGS_05,
718 class ARGS_06,
719 class ARGS_07,
720 class ARGS_08,
721 class ARGS_09>
722 void construct(ELEMENT_TYPE *address,
723 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
724 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
725 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
726 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
727 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
728 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
729 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
730 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
731 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
732 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09);
733#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 9
734
735#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 10
736 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
737 class ARGS_02,
738 class ARGS_03,
739 class ARGS_04,
740 class ARGS_05,
741 class ARGS_06,
742 class ARGS_07,
743 class ARGS_08,
744 class ARGS_09,
745 class ARGS_10>
746 void construct(ELEMENT_TYPE *address,
747 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
748 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
749 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
750 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
751 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
752 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
753 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
754 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
755 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
756 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
757 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10);
758#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 10
759
760#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 11
761 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
762 class ARGS_02,
763 class ARGS_03,
764 class ARGS_04,
765 class ARGS_05,
766 class ARGS_06,
767 class ARGS_07,
768 class ARGS_08,
769 class ARGS_09,
770 class ARGS_10,
771 class ARGS_11>
772 void construct(ELEMENT_TYPE *address,
773 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
774 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
775 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
776 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
777 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
778 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
779 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
780 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
781 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
782 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
783 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
784 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11);
785#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 11
786
787#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 12
788 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
789 class ARGS_02,
790 class ARGS_03,
791 class ARGS_04,
792 class ARGS_05,
793 class ARGS_06,
794 class ARGS_07,
795 class ARGS_08,
796 class ARGS_09,
797 class ARGS_10,
798 class ARGS_11,
799 class ARGS_12>
800 void construct(ELEMENT_TYPE *address,
801 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
802 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
803 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
804 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
805 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
806 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
807 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
808 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
809 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
810 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
811 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
812 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
813 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12);
814#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 12
815
816#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 13
817 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
818 class ARGS_02,
819 class ARGS_03,
820 class ARGS_04,
821 class ARGS_05,
822 class ARGS_06,
823 class ARGS_07,
824 class ARGS_08,
825 class ARGS_09,
826 class ARGS_10,
827 class ARGS_11,
828 class ARGS_12,
829 class ARGS_13>
830 void construct(ELEMENT_TYPE *address,
831 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
832 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
833 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
834 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
835 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
836 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
837 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
838 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
839 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
840 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
841 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
842 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
843 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
844 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13);
845#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 13
846
847#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 14
848 template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
849 class ARGS_02,
850 class ARGS_03,
851 class ARGS_04,
852 class ARGS_05,
853 class ARGS_06,
854 class ARGS_07,
855 class ARGS_08,
856 class ARGS_09,
857 class ARGS_10,
858 class ARGS_11,
859 class ARGS_12,
860 class ARGS_13,
861 class ARGS_14>
862 void construct(ELEMENT_TYPE *address,
863 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
864 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
865 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
866 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
867 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
868 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
869 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
870 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
871 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
872 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
873 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
874 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
875 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
876 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13,
877 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) arguments_14);
878#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_A >= 14
879
880#else
881// The generated code below is a workaround for the absence of perfect
882// forwarding in some compilers.
883 template <class ELEMENT_TYPE, class ARG1, class... ARGS>
884 void construct(ELEMENT_TYPE *address,
885 ARG1& argument1,
886 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... arguments);
887 template <class ELEMENT_TYPE, class ARG1, class... ARGS>
888 void construct(ELEMENT_TYPE *address,
889 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
890 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... arguments);
891// }}} END GENERATED CODE
892#endif
893
894 /// Call the `ELEMENT_TYPE` destructor for the object at the specified
895 /// `address` but do not deallocate the memory at `address`.
896 template <class ELEMENT_TYPE>
897 void destroy(ELEMENT_TYPE *address);
898
899 // ACCESSORS
900
901 /// Return the address of the object referred to by the specified `x`
902 /// reference, even if the (template parameter) `TYPE` overloads the
903 /// unary `operator&`.
904 pointer address(reference x) const;
906
907 /// Return the maximum number of elements of (template parameter) `TYPE`
908 /// that can be allocated using this allocator. Note that there is no
909 /// guarantee that attempts at allocating fewer elements than the value
910 /// returned by @ref max_size will not throw.
912
913 /// Return the address of the memory resource supplied on construction.
914 memory_resource *resource() const;
915
916 /// Return a default-constructed `polymorphic_allocator`.
918
919 // HIDDEN FRIENDS
920
921 /// Return `true` if memory allocated from either of the specified `a`
922 /// or `b` allocators can be deallocated from the other; otherwise
923 /// return `false`. This operator is selected by overload resolution if
924 /// at least one argument is a specialization of `polymorphic_allocator`
925 /// and the other is either the same specialization or is convertible to
926 /// `polymorphic_allocator`. Note that this operator is a "hidden
927 /// friend" so that it is found by only by ADL and is not considered
928 /// during overload resoution if neither argument is a specialization of
929 /// `polymorphic_allocator`; see
930 /// https://cplusplus.github.io/LWG/issue3683.
931 friend
932 bool operator==(const polymorphic_allocator& a,
934 {
935 return a.resource() == b.resource() || *a.resource() == *b.resource();
936 }
937
938 /// Return `true` if memory allocated from either of the specified `a`
939 /// or `b` allocators cannot necessarily be deallocated from the other;
940 /// otherwise return `false`. This operator is selected by overload
941 /// resolution if at least one argument is a specialization of
942 /// `polymorphic_allocator` and the other is either the same
943 /// specialization or is convertible to `polymorphic_allocator`. Note
944 /// that this operator is a "hidden friend" so that it is found by only
945 /// by ADL and is not considered during overload resoution if neither
946 /// argument is a specialization of `polymorphic_allocator`; see
947 /// https://cplusplus.github.io/LWG/issue3683.
948 friend
949 bool operator!=(const polymorphic_allocator& a,
951 {
952 return a.resource() != b.resource() && *a.resource() != *b.resource();
953 }
954};
955
956// FREE FUNCTIONS
957
958/// Return `true` if memory allocated from either of the specified `a` or
959/// `b` allocators can be deallocated from the other; otherwise return
960/// `false`. Note that, when `T1` and `T2` are different, this free
961/// operator is a better match than the hidden friend operator, which would
962/// otherwise be ambiguous.
963template <class T1, class T2>
964bool operator==(const polymorphic_allocator<T1>& a,
965 const polymorphic_allocator<T2>& b) BSLS_KEYWORD_NOEXCEPT;
966
967/// Return `true` if memory allocated from either of the specified `a` or
968/// `b` allocators cannot necessarily be deallocated from the other;
969/// otherwise return `false`. Note that, when `T1` and `T2` are different,
970/// this free operator is a better match than the hidden friend operator,
971/// which would otherwise be ambiguous.
972template <class T1, class T2>
973bool operator!=(const polymorphic_allocator<T1>& a,
974 const polymorphic_allocator<T2>& b) BSLS_KEYWORD_NOEXCEPT;
975
976} // close namespace bsl
977
978#endif // End C++03 code
979
980namespace bsl {
981
982 // ====================================================
983 // class allocator_traits<polymorphic_allocator<TYPE> >
984 // ====================================================
985
986/// This `struct` template provides a specialization of the
987/// `allocator_traits` class template for `bsl::polymorphic_allocator`.
988/// This specialization is not strictly necessary, but its presence speeds
989/// up compilation by bypassing a significant amount of metaprogramming.
990template <class TYPE>
991struct allocator_traits<polymorphic_allocator<TYPE> > {
992
993 // PUBLIC TYPES
994 typedef polymorphic_allocator<TYPE> allocator_type;
995 typedef TYPE value_type;
996
997 typedef TYPE *pointer;
998 typedef const TYPE *const_pointer;
999 typedef void *void_pointer;
1000 typedef const void *const_void_pointer;
1001 typedef std::ptrdiff_t difference_type;
1002 typedef std::size_t size_type;
1003
1004#ifdef BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES
1005 template <class TYPE2>
1006 using rebind_alloc = polymorphic_allocator<TYPE2>;
1007
1008 template <class TYPE2>
1009 using rebind_traits = allocator_traits<polymorphic_allocator<TYPE2> >;
1010#else
1011 template <class TYPE2>
1012 struct rebind_alloc : polymorphic_allocator<TYPE2> {
1013 rebind_alloc()
1014 : polymorphic_allocator<TYPE2>()
1015 {
1016 }
1017
1018 /// Convert from anything that can be used to cosntruct the base type.
1019 /// This might be better if SFINAE-ed out using `is_convertible`, but
1020 /// stressing older compilers more seems unwise.
1021 template <typename ARG>
1022 rebind_alloc(const ARG& allocatorArg)
1023 : polymorphic_allocator<TYPE2>(allocatorArg)
1024 {
1025 }
1026 };
1027
1028 template <class TYPE2>
1029 struct rebind_traits : allocator_traits<polymorphic_allocator<TYPE2> > {
1030 };
1031#endif
1032
1034 {
1035 return m.allocate(n);
1036 }
1037
1039 size_type n,
1040 const_void_pointer /* hint */)
1041 {
1042 return m.allocate(n);
1043 }
1044
1045 static void deallocate(allocator_type& m, pointer p, size_type n)
1046 {
1047 m.deallocate(p, n);
1048 }
1049
1050 template <class TYPE2>
1051 static void construct(allocator_type& m,
1052 TYPE2 *p)
1053 {
1054 m.construct(p);
1055 }
1056
1057#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1058// {{{ BEGIN GENERATED CODE
1059// Command line: sim_cpp11_features.pl bslma_polymorphicallocator.h
1060#ifndef BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT
1061#define BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT 14
1062#endif
1063#ifndef BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B
1064#define BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT
1065#endif
1066#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 0
1067 template <class TYPE2, class ARG1>
1068 static void construct(allocator_type& m,
1069 TYPE2 *p,
1070 ARG1& argument1)
1071 {
1072 m.construct(p,
1073 argument1);
1074 }
1075#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 0
1076
1077#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 1
1078 template <class TYPE2, class ARG1, class ARGS_01>
1079 static void construct(allocator_type& m,
1080 TYPE2 *p,
1081 ARG1& argument1,
1082 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01)
1083 {
1084 m.construct(p,
1085 argument1,
1086 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01));
1087 }
1088#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 1
1089
1090#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 2
1091 template <class TYPE2, class ARG1, class ARGS_01,
1092 class ARGS_02>
1093 static void construct(allocator_type& m,
1094 TYPE2 *p,
1095 ARG1& argument1,
1096 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1097 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02)
1098 {
1099 m.construct(p,
1100 argument1,
1101 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1102 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02));
1103 }
1104#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 2
1105
1106#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 3
1107 template <class TYPE2, class ARG1, class ARGS_01,
1108 class ARGS_02,
1109 class ARGS_03>
1110 static void construct(allocator_type& m,
1111 TYPE2 *p,
1112 ARG1& argument1,
1113 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1114 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1115 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03)
1116 {
1117 m.construct(p,
1118 argument1,
1119 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1120 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1121 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03));
1122 }
1123#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 3
1124
1125#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 4
1126 template <class TYPE2, class ARG1, class ARGS_01,
1127 class ARGS_02,
1128 class ARGS_03,
1129 class ARGS_04>
1130 static void construct(allocator_type& m,
1131 TYPE2 *p,
1132 ARG1& argument1,
1133 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1134 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1135 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1136 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04)
1137 {
1138 m.construct(p,
1139 argument1,
1140 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1141 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1142 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1143 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04));
1144 }
1145#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 4
1146
1147#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 5
1148 template <class TYPE2, class ARG1, class ARGS_01,
1149 class ARGS_02,
1150 class ARGS_03,
1151 class ARGS_04,
1152 class ARGS_05>
1153 static void construct(allocator_type& m,
1154 TYPE2 *p,
1155 ARG1& argument1,
1156 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1157 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1158 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1159 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1160 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05)
1161 {
1162 m.construct(p,
1163 argument1,
1164 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1165 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1166 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1167 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1168 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05));
1169 }
1170#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 5
1171
1172#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 6
1173 template <class TYPE2, class ARG1, class ARGS_01,
1174 class ARGS_02,
1175 class ARGS_03,
1176 class ARGS_04,
1177 class ARGS_05,
1178 class ARGS_06>
1179 static void construct(allocator_type& m,
1180 TYPE2 *p,
1181 ARG1& argument1,
1182 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1183 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1184 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1185 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1186 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1187 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06)
1188 {
1189 m.construct(p,
1190 argument1,
1191 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1192 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1193 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1194 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1195 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1196 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06));
1197 }
1198#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 6
1199
1200#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 7
1201 template <class TYPE2, class ARG1, class ARGS_01,
1202 class ARGS_02,
1203 class ARGS_03,
1204 class ARGS_04,
1205 class ARGS_05,
1206 class ARGS_06,
1207 class ARGS_07>
1208 static void construct(allocator_type& m,
1209 TYPE2 *p,
1210 ARG1& argument1,
1211 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1212 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1213 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1214 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1215 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1216 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1217 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07)
1218 {
1219 m.construct(p,
1220 argument1,
1221 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1222 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1223 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1224 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1225 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1226 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1227 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07));
1228 }
1229#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 7
1230
1231#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 8
1232 template <class TYPE2, class ARG1, class ARGS_01,
1233 class ARGS_02,
1234 class ARGS_03,
1235 class ARGS_04,
1236 class ARGS_05,
1237 class ARGS_06,
1238 class ARGS_07,
1239 class ARGS_08>
1240 static void construct(allocator_type& m,
1241 TYPE2 *p,
1242 ARG1& argument1,
1243 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1244 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1245 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1246 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1247 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1248 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1249 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1250 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08)
1251 {
1252 m.construct(p,
1253 argument1,
1254 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1255 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1256 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1257 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1258 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1259 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1260 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1261 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08));
1262 }
1263#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 8
1264
1265#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 9
1266 template <class TYPE2, class ARG1, class ARGS_01,
1267 class ARGS_02,
1268 class ARGS_03,
1269 class ARGS_04,
1270 class ARGS_05,
1271 class ARGS_06,
1272 class ARGS_07,
1273 class ARGS_08,
1274 class ARGS_09>
1275 static void construct(allocator_type& m,
1276 TYPE2 *p,
1277 ARG1& argument1,
1278 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1279 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1280 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1281 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1282 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1283 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1284 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1285 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1286 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09)
1287 {
1288 m.construct(p,
1289 argument1,
1290 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1291 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1292 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1293 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1294 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1295 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1296 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1297 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1298 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09));
1299 }
1300#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 9
1301
1302#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 10
1303 template <class TYPE2, class ARG1, class ARGS_01,
1304 class ARGS_02,
1305 class ARGS_03,
1306 class ARGS_04,
1307 class ARGS_05,
1308 class ARGS_06,
1309 class ARGS_07,
1310 class ARGS_08,
1311 class ARGS_09,
1312 class ARGS_10>
1313 static void construct(allocator_type& m,
1314 TYPE2 *p,
1315 ARG1& argument1,
1316 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1317 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1318 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1319 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1320 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1321 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1322 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1323 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1324 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1325 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10)
1326 {
1327 m.construct(p,
1328 argument1,
1329 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1330 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1331 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1332 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1333 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1334 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1335 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1336 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1337 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1338 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10));
1339 }
1340#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 10
1341
1342#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 11
1343 template <class TYPE2, class ARG1, class ARGS_01,
1344 class ARGS_02,
1345 class ARGS_03,
1346 class ARGS_04,
1347 class ARGS_05,
1348 class ARGS_06,
1349 class ARGS_07,
1350 class ARGS_08,
1351 class ARGS_09,
1352 class ARGS_10,
1353 class ARGS_11>
1354 static void construct(allocator_type& m,
1355 TYPE2 *p,
1356 ARG1& argument1,
1357 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1358 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1359 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1360 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1361 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1362 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1363 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1364 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1365 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1366 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1367 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11)
1368 {
1369 m.construct(p,
1370 argument1,
1371 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1372 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1373 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1374 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1375 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1376 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1377 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1378 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1379 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1380 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1381 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11));
1382 }
1383#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 11
1384
1385#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 12
1386 template <class TYPE2, class ARG1, class ARGS_01,
1387 class ARGS_02,
1388 class ARGS_03,
1389 class ARGS_04,
1390 class ARGS_05,
1391 class ARGS_06,
1392 class ARGS_07,
1393 class ARGS_08,
1394 class ARGS_09,
1395 class ARGS_10,
1396 class ARGS_11,
1397 class ARGS_12>
1398 static void construct(allocator_type& m,
1399 TYPE2 *p,
1400 ARG1& argument1,
1401 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1402 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1403 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1404 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1405 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1406 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1407 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1408 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1409 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1410 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1411 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
1412 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12)
1413 {
1414 m.construct(p,
1415 argument1,
1416 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1417 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1418 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1419 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1420 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1421 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1422 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1423 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1424 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1425 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1426 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
1427 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12));
1428 }
1429#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 12
1430
1431#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 13
1432 template <class TYPE2, class ARG1, class ARGS_01,
1433 class ARGS_02,
1434 class ARGS_03,
1435 class ARGS_04,
1436 class ARGS_05,
1437 class ARGS_06,
1438 class ARGS_07,
1439 class ARGS_08,
1440 class ARGS_09,
1441 class ARGS_10,
1442 class ARGS_11,
1443 class ARGS_12,
1444 class ARGS_13>
1445 static void construct(allocator_type& m,
1446 TYPE2 *p,
1447 ARG1& argument1,
1448 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1449 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1450 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1451 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1452 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1453 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1454 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1455 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1456 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1457 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1458 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
1459 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
1460 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13)
1461 {
1462 m.construct(p,
1463 argument1,
1464 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1465 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1466 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1467 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1468 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1469 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1470 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1471 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1472 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1473 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1474 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
1475 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
1476 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13));
1477 }
1478#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 13
1479
1480#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 14
1481 template <class TYPE2, class ARG1, class ARGS_01,
1482 class ARGS_02,
1483 class ARGS_03,
1484 class ARGS_04,
1485 class ARGS_05,
1486 class ARGS_06,
1487 class ARGS_07,
1488 class ARGS_08,
1489 class ARGS_09,
1490 class ARGS_10,
1491 class ARGS_11,
1492 class ARGS_12,
1493 class ARGS_13,
1494 class ARGS_14>
1495 static void construct(allocator_type& m,
1496 TYPE2 *p,
1497 ARG1& argument1,
1498 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1499 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1500 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1501 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1502 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1503 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1504 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1505 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1506 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1507 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1508 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
1509 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
1510 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13,
1511 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) arguments_14)
1512 {
1513 m.construct(p,
1514 argument1,
1515 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1516 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1517 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1518 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1519 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1520 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1521 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1522 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1523 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1524 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1525 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
1526 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
1527 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13),
1528 BSLS_COMPILERFEATURES_FORWARD(ARGS_14, arguments_14));
1529 }
1530#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 14
1531
1532
1533#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 0
1534 template <class TYPE2, class ARG1>
1535 static void construct(allocator_type& m,
1536 TYPE2 *p,
1537 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1)
1538 {
1539 m.construct(p,
1540 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1));
1541 }
1542#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 0
1543
1544#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 1
1545 template <class TYPE2, class ARG1, class ARGS_01>
1546 static void construct(allocator_type& m,
1547 TYPE2 *p,
1548 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1549 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01)
1550 {
1551 m.construct(p,
1552 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1553 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01));
1554 }
1555#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 1
1556
1557#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 2
1558 template <class TYPE2, class ARG1, class ARGS_01,
1559 class ARGS_02>
1560 static void construct(allocator_type& m,
1561 TYPE2 *p,
1562 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1563 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1564 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02)
1565 {
1566 m.construct(p,
1567 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1568 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1569 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02));
1570 }
1571#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 2
1572
1573#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 3
1574 template <class TYPE2, class ARG1, class ARGS_01,
1575 class ARGS_02,
1576 class ARGS_03>
1577 static void construct(allocator_type& m,
1578 TYPE2 *p,
1579 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1580 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1581 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1582 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03)
1583 {
1584 m.construct(p,
1585 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1586 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1587 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1588 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03));
1589 }
1590#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 3
1591
1592#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 4
1593 template <class TYPE2, class ARG1, class ARGS_01,
1594 class ARGS_02,
1595 class ARGS_03,
1596 class ARGS_04>
1597 static void construct(allocator_type& m,
1598 TYPE2 *p,
1599 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1600 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1601 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1602 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1603 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04)
1604 {
1605 m.construct(p,
1606 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1607 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1608 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1609 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1610 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04));
1611 }
1612#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 4
1613
1614#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 5
1615 template <class TYPE2, class ARG1, class ARGS_01,
1616 class ARGS_02,
1617 class ARGS_03,
1618 class ARGS_04,
1619 class ARGS_05>
1620 static void construct(allocator_type& m,
1621 TYPE2 *p,
1622 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1623 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1624 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1625 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1626 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1627 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05)
1628 {
1629 m.construct(p,
1630 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1631 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1632 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1633 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1634 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1635 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05));
1636 }
1637#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 5
1638
1639#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 6
1640 template <class TYPE2, class ARG1, class ARGS_01,
1641 class ARGS_02,
1642 class ARGS_03,
1643 class ARGS_04,
1644 class ARGS_05,
1645 class ARGS_06>
1646 static void construct(allocator_type& m,
1647 TYPE2 *p,
1648 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1649 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1650 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1651 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1652 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1653 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1654 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06)
1655 {
1656 m.construct(p,
1657 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1658 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1659 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1660 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1661 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1662 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1663 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06));
1664 }
1665#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 6
1666
1667#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 7
1668 template <class TYPE2, class ARG1, class ARGS_01,
1669 class ARGS_02,
1670 class ARGS_03,
1671 class ARGS_04,
1672 class ARGS_05,
1673 class ARGS_06,
1674 class ARGS_07>
1675 static void construct(allocator_type& m,
1676 TYPE2 *p,
1677 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1678 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1679 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1680 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1681 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1682 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1683 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1684 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07)
1685 {
1686 m.construct(p,
1687 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1688 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1689 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1690 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1691 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1692 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1693 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1694 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07));
1695 }
1696#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 7
1697
1698#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 8
1699 template <class TYPE2, class ARG1, class ARGS_01,
1700 class ARGS_02,
1701 class ARGS_03,
1702 class ARGS_04,
1703 class ARGS_05,
1704 class ARGS_06,
1705 class ARGS_07,
1706 class ARGS_08>
1707 static void construct(allocator_type& m,
1708 TYPE2 *p,
1709 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1710 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1711 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1712 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1713 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1714 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1715 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1716 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1717 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08)
1718 {
1719 m.construct(p,
1720 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1721 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1722 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1723 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1724 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1725 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1726 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1727 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1728 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08));
1729 }
1730#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 8
1731
1732#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 9
1733 template <class TYPE2, class ARG1, class ARGS_01,
1734 class ARGS_02,
1735 class ARGS_03,
1736 class ARGS_04,
1737 class ARGS_05,
1738 class ARGS_06,
1739 class ARGS_07,
1740 class ARGS_08,
1741 class ARGS_09>
1742 static void construct(allocator_type& m,
1743 TYPE2 *p,
1744 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1745 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1746 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1747 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1748 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1749 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1750 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1751 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1752 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1753 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09)
1754 {
1755 m.construct(p,
1756 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1757 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1758 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1759 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1760 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1761 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1762 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1763 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1764 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1765 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09));
1766 }
1767#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 9
1768
1769#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 10
1770 template <class TYPE2, class ARG1, class ARGS_01,
1771 class ARGS_02,
1772 class ARGS_03,
1773 class ARGS_04,
1774 class ARGS_05,
1775 class ARGS_06,
1776 class ARGS_07,
1777 class ARGS_08,
1778 class ARGS_09,
1779 class ARGS_10>
1780 static void construct(allocator_type& m,
1781 TYPE2 *p,
1782 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1783 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1784 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1785 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1786 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1787 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1788 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1789 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1790 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1791 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1792 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10)
1793 {
1794 m.construct(p,
1795 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1796 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1797 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1798 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1799 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1800 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1801 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1802 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1803 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1804 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1805 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10));
1806 }
1807#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 10
1808
1809#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 11
1810 template <class TYPE2, class ARG1, class ARGS_01,
1811 class ARGS_02,
1812 class ARGS_03,
1813 class ARGS_04,
1814 class ARGS_05,
1815 class ARGS_06,
1816 class ARGS_07,
1817 class ARGS_08,
1818 class ARGS_09,
1819 class ARGS_10,
1820 class ARGS_11>
1821 static void construct(allocator_type& m,
1822 TYPE2 *p,
1823 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1824 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1825 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1826 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1827 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1828 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1829 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1830 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1831 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1832 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1833 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1834 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11)
1835 {
1836 m.construct(p,
1837 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1838 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1839 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1840 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1841 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1842 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1843 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1844 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1845 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1846 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1847 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1848 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11));
1849 }
1850#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 11
1851
1852#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 12
1853 template <class TYPE2, class ARG1, class ARGS_01,
1854 class ARGS_02,
1855 class ARGS_03,
1856 class ARGS_04,
1857 class ARGS_05,
1858 class ARGS_06,
1859 class ARGS_07,
1860 class ARGS_08,
1861 class ARGS_09,
1862 class ARGS_10,
1863 class ARGS_11,
1864 class ARGS_12>
1865 static void construct(allocator_type& m,
1866 TYPE2 *p,
1867 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1868 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1869 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1870 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1871 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1872 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1873 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1874 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1875 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1876 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1877 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1878 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
1879 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12)
1880 {
1881 m.construct(p,
1882 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1883 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1884 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1885 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1886 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1887 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1888 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1889 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1890 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1891 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1892 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1893 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
1894 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12));
1895 }
1896#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 12
1897
1898#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 13
1899 template <class TYPE2, class ARG1, class ARGS_01,
1900 class ARGS_02,
1901 class ARGS_03,
1902 class ARGS_04,
1903 class ARGS_05,
1904 class ARGS_06,
1905 class ARGS_07,
1906 class ARGS_08,
1907 class ARGS_09,
1908 class ARGS_10,
1909 class ARGS_11,
1910 class ARGS_12,
1911 class ARGS_13>
1912 static void construct(allocator_type& m,
1913 TYPE2 *p,
1914 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1915 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1916 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1917 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1918 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1919 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1920 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1921 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1922 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1923 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1924 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1925 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
1926 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
1927 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13)
1928 {
1929 m.construct(p,
1930 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1931 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1932 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1933 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1934 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1935 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1936 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1937 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1938 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1939 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1940 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1941 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
1942 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
1943 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13));
1944 }
1945#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 13
1946
1947#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 14
1948 template <class TYPE2, class ARG1, class ARGS_01,
1949 class ARGS_02,
1950 class ARGS_03,
1951 class ARGS_04,
1952 class ARGS_05,
1953 class ARGS_06,
1954 class ARGS_07,
1955 class ARGS_08,
1956 class ARGS_09,
1957 class ARGS_10,
1958 class ARGS_11,
1959 class ARGS_12,
1960 class ARGS_13,
1961 class ARGS_14>
1962 static void construct(allocator_type& m,
1963 TYPE2 *p,
1964 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
1965 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
1966 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
1967 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
1968 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
1969 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
1970 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
1971 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
1972 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
1973 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
1974 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
1975 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
1976 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
1977 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13,
1978 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) arguments_14)
1979 {
1980 m.construct(p,
1981 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
1982 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
1983 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
1984 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
1985 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
1986 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
1987 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
1988 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
1989 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
1990 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
1991 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
1992 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
1993 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
1994 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13),
1995 BSLS_COMPILERFEATURES_FORWARD(ARGS_14, arguments_14));
1996 }
1997#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_B >= 14
1998
1999#else
2000// The generated code below is a workaround for the absence of perfect
2001// forwarding in some compilers.
2002 template <class TYPE2, class ARG1, class... ARGS>
2003 static void construct(allocator_type& m,
2004 TYPE2 *p,
2005 ARG1& argument1,
2006 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... arguments)
2007 {
2008 m.construct(p,
2009 argument1,
2010 BSLS_COMPILERFEATURES_FORWARD(ARGS, arguments)...);
2011 }
2012
2013 template <class TYPE2, class ARG1, class... ARGS>
2014 static void construct(allocator_type& m,
2015 TYPE2 *p,
2016 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2017 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... arguments)
2018 {
2019 m.construct(p,
2020 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2021 BSLS_COMPILERFEATURES_FORWARD(ARGS, arguments)...);
2022 }
2023// }}} END GENERATED CODE
2024#endif
2025
2026 template <class TYPE2>
2027 static void destroy(allocator_type&, TYPE2 *p)
2028 {
2029 p->~TYPE2();
2030 }
2031
2033 static size_type max_size(const allocator_type&)
2034 {
2035 // Return the largest value, 'v', such that 'v * sizeof(T)' fits in a
2036 // 'size_type'. Note that we cannot call
2037 // 'allocator_type::max_size()' because that method does not exist in
2038 // the C++17 standard library.
2039
2040 return (~size_type(0)) / sizeof(TYPE);
2041 }
2042
2043 // Allocator propagation traits
2044 static allocator_type
2046 {
2047 return allocator_type();
2048 }
2049
2054};
2055
2056} // close namespace bsl
2057
2058// ============================================================================
2059// TEMPLATES AND INLINE FUNCTION DEFINITIONS
2060// ============================================================================
2061
2062// TRAITS
2063namespace bsl {
2064
2065/// Note that the `bsl::is_trivially_copyable` trait automatically sets the
2066/// `bslmf::IsBitwiseMoveable` trait.
2067template <class TYPE>
2068struct is_trivially_copyable<polymorphic_allocator<TYPE> > : true_type { };
2069} // close namespace bsl
2070
2071
2072namespace bslma {
2073
2074/// Declare `polymorphic_allocator` as a C++11 compatible allocator for
2075/// all versions of C++.
2076template <class TYPE>
2077struct IsStdAllocator< ::bsl::polymorphic_allocator<TYPE> >
2079{
2080};
2081
2082/// An allocator is not *itself* an allocator-aware type, even though it is
2083/// convertible from `bsl::Allocator *`.
2084template <class TYPE>
2085struct UsesBslmaAllocator< ::bsl::polymorphic_allocator<TYPE> >
2086 : bsl::false_type {
2087};
2088
2089} // close namespace bslma
2090
2091namespace bslmf {
2092
2093template <class TYPE>
2094struct IsBitwiseEqualityComparable< ::bsl::polymorphic_allocator<TYPE> >
2095 : bsl::true_type { };
2096
2097} // close namespace bslmf
2098
2099
2100#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
2101
2102 // ----------------------------------------------
2103 // class template std::pmr::polymorphic_allocator
2104 // ----------------------------------------------
2105
2106// FREE FUNCTIONS
2107
2108// Put extra operators in the 'std::pmr' namespace, not 'bsl' namespace.
2109template <class TYPE>
2110inline
2111bool std::pmr::operator==(const std::pmr::polymorphic_allocator<TYPE>& a,
2112 const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& b)
2114{
2115 return a.resource() == b.resource() || *a.resource() == *b.resource();
2116}
2117
2118template <class TYPE>
2119inline
2120bool std::pmr::operator==(const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& a,
2121 const std::pmr::polymorphic_allocator<TYPE>& b)
2123{
2124 return a.resource() == b.resource() || *a.resource() == *b.resource();
2125}
2126
2127template <class TYPE>
2128inline
2129bool std::pmr::operator!=(const std::pmr::polymorphic_allocator<TYPE>& a,
2130 const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& b)
2132{
2133 return a.resource() != b.resource() && *a.resource() != *b.resource();
2134}
2135
2136template <class TYPE>
2137inline
2138bool std::pmr::operator!=(const BSLMF_POLYMORPHICALLOCATOR_NODEDUCE_T(TYPE)& a,
2139 const std::pmr::polymorphic_allocator<TYPE>& b)
2141{
2142 return a.resource() != b.resource() && *a.resource() != *b.resource();
2143}
2144
2145#else // if ! defined(BSLS_LIBRARYFEATURES_HAS_CPP17_PMR)
2146
2147namespace bsl {
2148
2149 // -----------------------------------------
2150 // class template bsl::polymorphic_allocator
2151 // -----------------------------------------
2152
2153// CREATORS
2154template <class TYPE>
2156: d_resource(BloombergLP::bslma::Default::defaultAllocator())
2157{
2158}
2159
2160template <class TYPE>
2161inline
2163: d_resource(r)
2164{
2165 BSLS_ASSERT(r != 0);
2166}
2167
2168#ifndef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
2169// In C++11 or later, this copy constructor is defaulted.
2170template <class TYPE>
2171inline
2172polymorphic_allocator<TYPE>::
2173polymorphic_allocator(const polymorphic_allocator& other) BSLS_KEYWORD_NOEXCEPT
2174: d_resource(other.resource())
2175{
2176}
2177#endif
2178
2179template <class TYPE>
2180template<class ANY_TYPE>
2181inline
2182polymorphic_allocator<TYPE>::
2183polymorphic_allocator(const polymorphic_allocator<ANY_TYPE>& other)
2185: d_resource(other.resource())
2186{
2187}
2188
2189// MANIPULATORS
2190template <class TYPE>
2191inline
2192TYPE *polymorphic_allocator<TYPE>::allocate(std::size_t n)
2193{
2194 const size_t k_TYPE_ALIGNMENT =
2195 BloombergLP::bsls::AlignmentFromType<TYPE>::VALUE;
2196
2197 if (n > this->max_size()) {
2198 BloombergLP::bsls::BslExceptionUtil::throwBadAlloc();
2199 }
2200
2201 return static_cast<TYPE *>(d_resource->allocate(n * sizeof(TYPE),
2202 k_TYPE_ALIGNMENT));
2203}
2204
2205#ifndef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
2206template <class TYPE>
2207inline
2208TYPE *
2209polymorphic_allocator<TYPE>::allocate(std::size_t n, const void * /* hint */)
2210{
2211 return this->allocate(n);
2212}
2213#endif
2214
2215template <class TYPE>
2216inline
2217void polymorphic_allocator<TYPE>::deallocate(TYPE *p, std::size_t n)
2218{
2219 const std::size_t k_TYPE_ALIGNMENT =
2220 BloombergLP::bsls::AlignmentFromType<TYPE>::VALUE;
2221
2222 d_resource->deallocate(p, n * sizeof(TYPE), k_TYPE_ALIGNMENT);
2223}
2224
2225template <class TYPE>
2226template <class ELEMENT_TYPE>
2227inline
2228void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address)
2229{
2230 BloombergLP::bslma::ConstructionUtil::construct(address, *this);
2231}
2232
2233#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
2234// {{{ BEGIN GENERATED CODE
2235// Command line: sim_cpp11_features.pl bslma_polymorphicallocator.h
2236#ifndef BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT
2237#define BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT 14
2238#endif
2239#ifndef BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C
2240#define BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT
2241#endif
2242#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 0
2243template <class TYPE>
2244template <class ELEMENT_TYPE, class ARG1>
2245inline
2246void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2247 ARG1& argument1)
2248{
2249 BloombergLP::bslma::ConstructionUtil::construct(
2250 address,
2251 *this,
2252 argument1);
2253}
2254#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 0
2255
2256#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 1
2257template <class TYPE>
2258template <class ELEMENT_TYPE, class ARG1, class ARGS_01>
2259inline
2260void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2261 ARG1& argument1,
2262 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01)
2263{
2264 BloombergLP::bslma::ConstructionUtil::construct(
2265 address,
2266 *this,
2267 argument1,
2268 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01));
2269}
2270#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 1
2271
2272#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 2
2273template <class TYPE>
2274template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2275 class ARGS_02>
2276inline
2277void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2278 ARG1& argument1,
2279 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2280 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02)
2281{
2282 BloombergLP::bslma::ConstructionUtil::construct(
2283 address,
2284 *this,
2285 argument1,
2286 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2287 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02));
2288}
2289#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 2
2290
2291#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 3
2292template <class TYPE>
2293template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2294 class ARGS_02,
2295 class ARGS_03>
2296inline
2297void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2298 ARG1& argument1,
2299 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2300 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2301 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03)
2302{
2303 BloombergLP::bslma::ConstructionUtil::construct(
2304 address,
2305 *this,
2306 argument1,
2307 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2308 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2309 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03));
2310}
2311#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 3
2312
2313#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 4
2314template <class TYPE>
2315template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2316 class ARGS_02,
2317 class ARGS_03,
2318 class ARGS_04>
2319inline
2320void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2321 ARG1& argument1,
2322 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2323 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2324 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2325 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04)
2326{
2327 BloombergLP::bslma::ConstructionUtil::construct(
2328 address,
2329 *this,
2330 argument1,
2331 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2332 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2333 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2334 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04));
2335}
2336#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 4
2337
2338#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 5
2339template <class TYPE>
2340template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2341 class ARGS_02,
2342 class ARGS_03,
2343 class ARGS_04,
2344 class ARGS_05>
2345inline
2346void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2347 ARG1& argument1,
2348 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2349 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2350 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2351 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2352 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05)
2353{
2354 BloombergLP::bslma::ConstructionUtil::construct(
2355 address,
2356 *this,
2357 argument1,
2358 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2359 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2360 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2361 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2362 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05));
2363}
2364#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 5
2365
2366#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 6
2367template <class TYPE>
2368template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2369 class ARGS_02,
2370 class ARGS_03,
2371 class ARGS_04,
2372 class ARGS_05,
2373 class ARGS_06>
2374inline
2375void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2376 ARG1& argument1,
2377 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2378 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2379 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2380 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2381 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2382 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06)
2383{
2384 BloombergLP::bslma::ConstructionUtil::construct(
2385 address,
2386 *this,
2387 argument1,
2388 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2389 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2390 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2391 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2392 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2393 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06));
2394}
2395#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 6
2396
2397#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 7
2398template <class TYPE>
2399template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2400 class ARGS_02,
2401 class ARGS_03,
2402 class ARGS_04,
2403 class ARGS_05,
2404 class ARGS_06,
2405 class ARGS_07>
2406inline
2407void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2408 ARG1& argument1,
2409 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2410 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2411 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2412 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2413 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2414 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2415 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07)
2416{
2417 BloombergLP::bslma::ConstructionUtil::construct(
2418 address,
2419 *this,
2420 argument1,
2421 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2422 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2423 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2424 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2425 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2426 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2427 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07));
2428}
2429#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 7
2430
2431#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 8
2432template <class TYPE>
2433template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2434 class ARGS_02,
2435 class ARGS_03,
2436 class ARGS_04,
2437 class ARGS_05,
2438 class ARGS_06,
2439 class ARGS_07,
2440 class ARGS_08>
2441inline
2442void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2443 ARG1& argument1,
2444 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2445 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2446 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2447 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2448 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2449 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2450 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2451 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08)
2452{
2453 BloombergLP::bslma::ConstructionUtil::construct(
2454 address,
2455 *this,
2456 argument1,
2457 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2458 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2459 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2460 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2461 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2462 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2463 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2464 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08));
2465}
2466#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 8
2467
2468#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 9
2469template <class TYPE>
2470template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2471 class ARGS_02,
2472 class ARGS_03,
2473 class ARGS_04,
2474 class ARGS_05,
2475 class ARGS_06,
2476 class ARGS_07,
2477 class ARGS_08,
2478 class ARGS_09>
2479inline
2480void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2481 ARG1& argument1,
2482 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2483 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2484 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2485 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2486 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2487 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2488 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2489 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
2490 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09)
2491{
2492 BloombergLP::bslma::ConstructionUtil::construct(
2493 address,
2494 *this,
2495 argument1,
2496 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2497 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2498 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2499 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2500 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2501 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2502 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2503 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
2504 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09));
2505}
2506#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 9
2507
2508#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 10
2509template <class TYPE>
2510template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2511 class ARGS_02,
2512 class ARGS_03,
2513 class ARGS_04,
2514 class ARGS_05,
2515 class ARGS_06,
2516 class ARGS_07,
2517 class ARGS_08,
2518 class ARGS_09,
2519 class ARGS_10>
2520inline
2521void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2522 ARG1& argument1,
2523 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2524 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2525 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2526 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2527 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2528 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2529 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2530 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
2531 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
2532 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10)
2533{
2534 BloombergLP::bslma::ConstructionUtil::construct(
2535 address,
2536 *this,
2537 argument1,
2538 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2539 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2540 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2541 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2542 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2543 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2544 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2545 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
2546 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
2547 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10));
2548}
2549#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 10
2550
2551#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 11
2552template <class TYPE>
2553template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2554 class ARGS_02,
2555 class ARGS_03,
2556 class ARGS_04,
2557 class ARGS_05,
2558 class ARGS_06,
2559 class ARGS_07,
2560 class ARGS_08,
2561 class ARGS_09,
2562 class ARGS_10,
2563 class ARGS_11>
2564inline
2565void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2566 ARG1& argument1,
2567 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2568 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2569 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2570 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2571 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2572 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2573 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2574 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
2575 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
2576 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
2577 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11)
2578{
2579 BloombergLP::bslma::ConstructionUtil::construct(
2580 address,
2581 *this,
2582 argument1,
2583 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2584 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2585 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2586 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2587 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2588 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2589 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2590 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
2591 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
2592 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
2593 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11));
2594}
2595#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 11
2596
2597#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 12
2598template <class TYPE>
2599template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2600 class ARGS_02,
2601 class ARGS_03,
2602 class ARGS_04,
2603 class ARGS_05,
2604 class ARGS_06,
2605 class ARGS_07,
2606 class ARGS_08,
2607 class ARGS_09,
2608 class ARGS_10,
2609 class ARGS_11,
2610 class ARGS_12>
2611inline
2612void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2613 ARG1& argument1,
2614 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2615 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2616 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2617 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2618 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2619 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2620 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2621 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
2622 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
2623 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
2624 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
2625 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12)
2626{
2627 BloombergLP::bslma::ConstructionUtil::construct(
2628 address,
2629 *this,
2630 argument1,
2631 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2632 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2633 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2634 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2635 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2636 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2637 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2638 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
2639 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
2640 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
2641 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
2642 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12));
2643}
2644#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 12
2645
2646#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 13
2647template <class TYPE>
2648template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2649 class ARGS_02,
2650 class ARGS_03,
2651 class ARGS_04,
2652 class ARGS_05,
2653 class ARGS_06,
2654 class ARGS_07,
2655 class ARGS_08,
2656 class ARGS_09,
2657 class ARGS_10,
2658 class ARGS_11,
2659 class ARGS_12,
2660 class ARGS_13>
2661inline
2662void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2663 ARG1& argument1,
2664 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2665 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2666 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2667 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2668 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2669 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2670 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2671 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
2672 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
2673 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
2674 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
2675 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
2676 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13)
2677{
2678 BloombergLP::bslma::ConstructionUtil::construct(
2679 address,
2680 *this,
2681 argument1,
2682 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2683 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2684 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2685 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2686 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2687 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2688 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2689 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
2690 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
2691 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
2692 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
2693 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
2694 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13));
2695}
2696#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 13
2697
2698#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 14
2699template <class TYPE>
2700template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2701 class ARGS_02,
2702 class ARGS_03,
2703 class ARGS_04,
2704 class ARGS_05,
2705 class ARGS_06,
2706 class ARGS_07,
2707 class ARGS_08,
2708 class ARGS_09,
2709 class ARGS_10,
2710 class ARGS_11,
2711 class ARGS_12,
2712 class ARGS_13,
2713 class ARGS_14>
2714inline
2715void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
2716 ARG1& argument1,
2717 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2718 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2719 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2720 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2721 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2722 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2723 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2724 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
2725 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
2726 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
2727 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
2728 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
2729 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13,
2730 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) arguments_14)
2731{
2732 BloombergLP::bslma::ConstructionUtil::construct(
2733 address,
2734 *this,
2735 argument1,
2736 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2737 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2738 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2739 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2740 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2741 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2742 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2743 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
2744 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
2745 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
2746 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
2747 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
2748 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13),
2749 BSLS_COMPILERFEATURES_FORWARD(ARGS_14, arguments_14));
2750}
2751#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 14
2752
2753
2754#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 0
2755template <class TYPE>
2756template <class ELEMENT_TYPE, class ARG1>
2757inline
2758void polymorphic_allocator<TYPE>::construct(
2759 ELEMENT_TYPE *address,
2760 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1)
2761{
2762 BloombergLP::bslma::ConstructionUtil::construct(
2763 address,
2764 *this,
2765 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1));
2766}
2767#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 0
2768
2769#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 1
2770template <class TYPE>
2771template <class ELEMENT_TYPE, class ARG1, class ARGS_01>
2772inline
2773void polymorphic_allocator<TYPE>::construct(
2774 ELEMENT_TYPE *address,
2775 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2776 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01)
2777{
2778 BloombergLP::bslma::ConstructionUtil::construct(
2779 address,
2780 *this,
2781 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2782 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01));
2783}
2784#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 1
2785
2786#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 2
2787template <class TYPE>
2788template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2789 class ARGS_02>
2790inline
2791void polymorphic_allocator<TYPE>::construct(
2792 ELEMENT_TYPE *address,
2793 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2794 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2795 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02)
2796{
2797 BloombergLP::bslma::ConstructionUtil::construct(
2798 address,
2799 *this,
2800 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2801 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2802 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02));
2803}
2804#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 2
2805
2806#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 3
2807template <class TYPE>
2808template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2809 class ARGS_02,
2810 class ARGS_03>
2811inline
2812void polymorphic_allocator<TYPE>::construct(
2813 ELEMENT_TYPE *address,
2814 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2815 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2816 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2817 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03)
2818{
2819 BloombergLP::bslma::ConstructionUtil::construct(
2820 address,
2821 *this,
2822 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2823 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2824 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2825 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03));
2826}
2827#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 3
2828
2829#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 4
2830template <class TYPE>
2831template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2832 class ARGS_02,
2833 class ARGS_03,
2834 class ARGS_04>
2835inline
2836void polymorphic_allocator<TYPE>::construct(
2837 ELEMENT_TYPE *address,
2838 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2839 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2840 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2841 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2842 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04)
2843{
2844 BloombergLP::bslma::ConstructionUtil::construct(
2845 address,
2846 *this,
2847 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2848 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2849 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2850 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2851 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04));
2852}
2853#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 4
2854
2855#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 5
2856template <class TYPE>
2857template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2858 class ARGS_02,
2859 class ARGS_03,
2860 class ARGS_04,
2861 class ARGS_05>
2862inline
2863void polymorphic_allocator<TYPE>::construct(
2864 ELEMENT_TYPE *address,
2865 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2866 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2867 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2868 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2869 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2870 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05)
2871{
2872 BloombergLP::bslma::ConstructionUtil::construct(
2873 address,
2874 *this,
2875 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2876 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2877 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2878 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2879 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2880 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05));
2881}
2882#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 5
2883
2884#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 6
2885template <class TYPE>
2886template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2887 class ARGS_02,
2888 class ARGS_03,
2889 class ARGS_04,
2890 class ARGS_05,
2891 class ARGS_06>
2892inline
2893void polymorphic_allocator<TYPE>::construct(
2894 ELEMENT_TYPE *address,
2895 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2896 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2897 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2898 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2899 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2900 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2901 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06)
2902{
2903 BloombergLP::bslma::ConstructionUtil::construct(
2904 address,
2905 *this,
2906 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2907 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2908 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2909 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2910 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2911 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2912 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06));
2913}
2914#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 6
2915
2916#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 7
2917template <class TYPE>
2918template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2919 class ARGS_02,
2920 class ARGS_03,
2921 class ARGS_04,
2922 class ARGS_05,
2923 class ARGS_06,
2924 class ARGS_07>
2925inline
2926void polymorphic_allocator<TYPE>::construct(
2927 ELEMENT_TYPE *address,
2928 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2929 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2930 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2931 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2932 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2933 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2934 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2935 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07)
2936{
2937 BloombergLP::bslma::ConstructionUtil::construct(
2938 address,
2939 *this,
2940 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2941 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2942 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2943 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2944 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2945 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2946 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2947 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07));
2948}
2949#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 7
2950
2951#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 8
2952template <class TYPE>
2953template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2954 class ARGS_02,
2955 class ARGS_03,
2956 class ARGS_04,
2957 class ARGS_05,
2958 class ARGS_06,
2959 class ARGS_07,
2960 class ARGS_08>
2961inline
2962void polymorphic_allocator<TYPE>::construct(
2963 ELEMENT_TYPE *address,
2964 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
2965 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
2966 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
2967 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
2968 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
2969 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
2970 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
2971 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
2972 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08)
2973{
2974 BloombergLP::bslma::ConstructionUtil::construct(
2975 address,
2976 *this,
2977 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
2978 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
2979 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
2980 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
2981 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
2982 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
2983 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
2984 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
2985 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08));
2986}
2987#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 8
2988
2989#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 9
2990template <class TYPE>
2991template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
2992 class ARGS_02,
2993 class ARGS_03,
2994 class ARGS_04,
2995 class ARGS_05,
2996 class ARGS_06,
2997 class ARGS_07,
2998 class ARGS_08,
2999 class ARGS_09>
3000inline
3001void polymorphic_allocator<TYPE>::construct(
3002 ELEMENT_TYPE *address,
3003 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3004 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
3005 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
3006 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
3007 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
3008 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
3009 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
3010 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
3011 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
3012 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09)
3013{
3014 BloombergLP::bslma::ConstructionUtil::construct(
3015 address,
3016 *this,
3017 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3018 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
3019 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
3020 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
3021 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
3022 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
3023 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
3024 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
3025 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
3026 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09));
3027}
3028#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 9
3029
3030#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 10
3031template <class TYPE>
3032template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
3033 class ARGS_02,
3034 class ARGS_03,
3035 class ARGS_04,
3036 class ARGS_05,
3037 class ARGS_06,
3038 class ARGS_07,
3039 class ARGS_08,
3040 class ARGS_09,
3041 class ARGS_10>
3042inline
3043void polymorphic_allocator<TYPE>::construct(
3044 ELEMENT_TYPE *address,
3045 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3046 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
3047 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
3048 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
3049 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
3050 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
3051 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
3052 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
3053 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
3054 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
3055 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10)
3056{
3057 BloombergLP::bslma::ConstructionUtil::construct(
3058 address,
3059 *this,
3060 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3061 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
3062 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
3063 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
3064 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
3065 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
3066 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
3067 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
3068 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
3069 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
3070 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10));
3071}
3072#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 10
3073
3074#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 11
3075template <class TYPE>
3076template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
3077 class ARGS_02,
3078 class ARGS_03,
3079 class ARGS_04,
3080 class ARGS_05,
3081 class ARGS_06,
3082 class ARGS_07,
3083 class ARGS_08,
3084 class ARGS_09,
3085 class ARGS_10,
3086 class ARGS_11>
3087inline
3088void polymorphic_allocator<TYPE>::construct(
3089 ELEMENT_TYPE *address,
3090 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3091 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
3092 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
3093 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
3094 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
3095 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
3096 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
3097 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
3098 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
3099 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
3100 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
3101 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11)
3102{
3103 BloombergLP::bslma::ConstructionUtil::construct(
3104 address,
3105 *this,
3106 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3107 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
3108 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
3109 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
3110 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
3111 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
3112 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
3113 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
3114 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
3115 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
3116 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
3117 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11));
3118}
3119#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 11
3120
3121#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 12
3122template <class TYPE>
3123template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
3124 class ARGS_02,
3125 class ARGS_03,
3126 class ARGS_04,
3127 class ARGS_05,
3128 class ARGS_06,
3129 class ARGS_07,
3130 class ARGS_08,
3131 class ARGS_09,
3132 class ARGS_10,
3133 class ARGS_11,
3134 class ARGS_12>
3135inline
3136void polymorphic_allocator<TYPE>::construct(
3137 ELEMENT_TYPE *address,
3138 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3139 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
3140 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
3141 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
3142 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
3143 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
3144 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
3145 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
3146 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
3147 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
3148 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
3149 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
3150 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12)
3151{
3152 BloombergLP::bslma::ConstructionUtil::construct(
3153 address,
3154 *this,
3155 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3156 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
3157 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
3158 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
3159 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
3160 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
3161 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
3162 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
3163 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
3164 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
3165 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
3166 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
3167 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12));
3168}
3169#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 12
3170
3171#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 13
3172template <class TYPE>
3173template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
3174 class ARGS_02,
3175 class ARGS_03,
3176 class ARGS_04,
3177 class ARGS_05,
3178 class ARGS_06,
3179 class ARGS_07,
3180 class ARGS_08,
3181 class ARGS_09,
3182 class ARGS_10,
3183 class ARGS_11,
3184 class ARGS_12,
3185 class ARGS_13>
3186inline
3187void polymorphic_allocator<TYPE>::construct(
3188 ELEMENT_TYPE *address,
3189 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3190 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
3191 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
3192 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
3193 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
3194 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
3195 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
3196 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
3197 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
3198 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
3199 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
3200 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
3201 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
3202 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13)
3203{
3204 BloombergLP::bslma::ConstructionUtil::construct(
3205 address,
3206 *this,
3207 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3208 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
3209 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
3210 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
3211 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
3212 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
3213 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
3214 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
3215 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
3216 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
3217 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
3218 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
3219 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
3220 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13));
3221}
3222#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 13
3223
3224#if BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 14
3225template <class TYPE>
3226template <class ELEMENT_TYPE, class ARG1, class ARGS_01,
3227 class ARGS_02,
3228 class ARGS_03,
3229 class ARGS_04,
3230 class ARGS_05,
3231 class ARGS_06,
3232 class ARGS_07,
3233 class ARGS_08,
3234 class ARGS_09,
3235 class ARGS_10,
3236 class ARGS_11,
3237 class ARGS_12,
3238 class ARGS_13,
3239 class ARGS_14>
3240inline
3241void polymorphic_allocator<TYPE>::construct(
3242 ELEMENT_TYPE *address,
3243 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3244 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) arguments_01,
3245 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) arguments_02,
3246 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) arguments_03,
3247 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) arguments_04,
3248 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) arguments_05,
3249 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) arguments_06,
3250 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) arguments_07,
3251 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) arguments_08,
3252 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) arguments_09,
3253 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) arguments_10,
3254 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) arguments_11,
3255 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) arguments_12,
3256 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) arguments_13,
3257 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) arguments_14)
3258{
3259 BloombergLP::bslma::ConstructionUtil::construct(
3260 address,
3261 *this,
3262 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3263 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, arguments_01),
3264 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, arguments_02),
3265 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, arguments_03),
3266 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, arguments_04),
3267 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, arguments_05),
3268 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, arguments_06),
3269 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, arguments_07),
3270 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, arguments_08),
3271 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, arguments_09),
3272 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, arguments_10),
3273 BSLS_COMPILERFEATURES_FORWARD(ARGS_11, arguments_11),
3274 BSLS_COMPILERFEATURES_FORWARD(ARGS_12, arguments_12),
3275 BSLS_COMPILERFEATURES_FORWARD(ARGS_13, arguments_13),
3276 BSLS_COMPILERFEATURES_FORWARD(ARGS_14, arguments_14));
3277}
3278#endif // BSLMA_POLYMORPHICALLOCATOR_VARIADIC_LIMIT_C >= 14
3279
3280#else
3281// The generated code below is a workaround for the absence of perfect
3282// forwarding in some compilers.
3283template <class TYPE>
3284template <class ELEMENT_TYPE, class ARG1, class... ARGS>
3285inline
3286void polymorphic_allocator<TYPE>::construct(ELEMENT_TYPE *address,
3287 ARG1& argument1,
3288 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... arguments)
3289{
3290 BloombergLP::bslma::ConstructionUtil::construct(
3291 address,
3292 *this,
3293 argument1,
3294 BSLS_COMPILERFEATURES_FORWARD(ARGS, arguments)...);
3295}
3296
3297template <class TYPE>
3298template <class ELEMENT_TYPE, class ARG1, class... ARGS>
3299inline
3300void polymorphic_allocator<TYPE>::construct(
3301 ELEMENT_TYPE *address,
3302 BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1,
3303 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... arguments)
3304{
3305 BloombergLP::bslma::ConstructionUtil::construct(
3306 address,
3307 *this,
3308 BSLS_COMPILERFEATURES_FORWARD(ARG1, argument1),
3309 BSLS_COMPILERFEATURES_FORWARD(ARGS, arguments)...);
3310}
3311// }}} END GENERATED CODE
3312#endif
3313
3314template <class TYPE>
3315template <class ELEMENT_TYPE>
3316inline
3317void polymorphic_allocator<TYPE>::destroy(ELEMENT_TYPE *address)
3318{
3319 BloombergLP::bslma::DestructionUtil::destroy(address);
3320}
3321
3322
3323// ACCESSORS
3324template <class TYPE>
3325inline
3326typename polymorphic_allocator<TYPE>::pointer
3327polymorphic_allocator<TYPE>::address(reference x) const
3328{
3329 return BloombergLP::bsls::Util::addressOf(x);
3330}
3331
3332template <class TYPE>
3333inline
3334typename polymorphic_allocator<TYPE>::const_pointer
3335polymorphic_allocator<TYPE>::address(const_reference x) const
3336{
3337 return BloombergLP::bsls::Util::addressOf(x);
3338}
3339
3340template <class TYPE>
3342typename polymorphic_allocator<TYPE>::size_type
3343polymorphic_allocator<TYPE>::max_size() const
3344{
3345 // Return the largest value, 'v', such that 'v * sizeof(T)' fits in a
3346 // 'size_type'.
3347
3348 return (~size_type(0)) / sizeof(TYPE);
3349}
3350
3351template <class TYPE>
3352inline
3353memory_resource *polymorphic_allocator<TYPE>::resource() const
3354{
3355 return d_resource;
3356}
3357
3358template <class TYPE>
3359inline
3360polymorphic_allocator<TYPE>
3361polymorphic_allocator<TYPE>::select_on_container_copy_construction() const
3362{
3363 return polymorphic_allocator();
3364}
3365
3366} // Close namespace bsl
3367
3368// FREE FUNCTIONS
3369template <class T1, class T2>
3370inline
3371bool
3374{
3375 return a.resource() == b.resource() || *a.resource() == *b.resource();
3376}
3377
3378template <class T1, class T2>
3379inline
3380bool
3383{
3384 return a.resource() != b.resource() && *a.resource() != *b.resource();
3385}
3386
3387#endif // defined(BSLS_LIBRARYFEATURES_HAS_CPP17_PMR)
3388
3389#else // if ! defined(DEFINED_BSLMA_POLYMORPHICALLOCATOR_H)
3390# error Not valid except when included from bslma_polymorphicallocator.h
3391#endif // ! defined(COMPILING_BSLMA_POLYMORPHICALLOCATOR_H)
3392
3393#endif // ! defined(INCLUDED_BSLMA_POLYMORPHICALLOCATOR_CPP03)
3394
3395// ----------------------------------------------------------------------------
3396// Copyright 2022 Bloomberg Finance L.P.
3397//
3398// Licensed under the Apache License, Version 2.0 (the "License");
3399// you may not use this file except in compliance with the License.
3400// You may obtain a copy of the License at
3401//
3402// http://www.apache.org/licenses/LICENSE-2.0
3403//
3404// Unless required by applicable law or agreed to in writing, software
3405// distributed under the License is distributed on an "AS IS" BASIS,
3406// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3407// See the License for the specific language governing permissions and
3408// limitations under the License.
3409// ----------------------------- END-OF-FILE ----------------------------------
3410
3411/** @} */
3412/** @} */
3413/** @} */
Definition bslma_polymorphicallocator.h:452
friend bool operator==(const polymorphic_allocator &a, const polymorphic_allocator &b) BSLS_KEYWORD_NOEXCEPT
Definition bslma_polymorphicallocator.h:622
BSLS_ANNOTATION_NODISCARD TYPE * allocate(std::size_t n)
Definition bslma_polymorphicallocator.h:937
memory_resource * resource() const
Return the address of the memory resource supplied on construction.
Definition bslma_polymorphicallocator.h:1048
TYPE * pointer
Definition bslma_polymorphicallocator.h:465
friend bool operator!=(const polymorphic_allocator &a, const polymorphic_allocator &b) BSLS_KEYWORD_NOEXCEPT
Definition bslma_polymorphicallocator.h:639
void construct(ELEMENT_TYPE *address)
Definition bslma_polymorphicallocator.h:973
const TYPE * const_pointer
Definition bslma_polymorphicallocator.h:466
polymorphic_allocator() BSLS_KEYWORD_NOEXCEPT
Definition bslma_polymorphicallocator.h:900
std::ptrdiff_t difference_type
Definition bslma_polymorphicallocator.h:464
TYPE & reference
Definition bslma_polymorphicallocator.h:467
std::size_t size_type
Definition bslma_polymorphicallocator.h:463
BSLS_KEYWORD_CONSTEXPR size_type max_size() const
Definition bslma_polymorphicallocator.h:1038
polymorphic_allocator select_on_container_copy_construction() const
Return a default-constructed polymorphic_allocator.
Definition bslma_polymorphicallocator.h:1056
TYPE value_type
Definition bslma_polymorphicallocator.h:469
void deallocate(TYPE *p, std::size_t n)
Definition bslma_polymorphicallocator.h:962
const TYPE & const_reference
Definition bslma_polymorphicallocator.h:468
pointer address(reference x) const
Definition bslma_polymorphicallocator.h:1022
void destroy(ELEMENT_TYPE *address)
Definition bslma_polymorphicallocator.h:1012
#define BSLS_ANNOTATION_NODISCARD
Definition bsls_annotation.h:373
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_KEYWORD_CONSTEXPR
Definition bsls_keyword.h:588
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:609
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
bool operator!=(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
bool operator==(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
Definition bdlb_printmethods.h:283
integral_constant< bool, false > false_type
Definition bslmf_integralconstant.h:297
integral_constant< bool, true > true_type
Definition bslmf_integralconstant.h:303
bool operator==(const memory_resource &a, const memory_resource &b)
bool operator!=(const memory_resource &a, const memory_resource &b)
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
rebind_alloc(const ARG &allocatorArg)
Definition bslma_allocatortraits.h:1193
static pointer allocate(ALLOCATOR_TYPE &basicAllocator, size_type n)
Return basicAllocator.allocate(n).
Definition bslma_allocatortraits.h:1439
BloombergLP::bslma::AllocatorTraits_ConstPointerType< ALLOCATOR_TYPE >::type const_pointer
Definition bslma_allocatortraits.h:1152
BloombergLP::bslma::AllocatorTraits_VoidPointerType< ALLOCATOR_TYPE >::type void_pointer
Definition bslma_allocatortraits.h:1155
BloombergLP::bslma::AllocatorTraits_PropOnCopyAssign< ALLOCATOR_TYPE >::type propagate_on_container_copy_assignment
Definition bslma_allocatortraits.h:1297
BloombergLP::bslma::AllocatorTraits_PropOnMoveAssign< ALLOCATOR_TYPE >::type propagate_on_container_move_assignment
Definition bslma_allocatortraits.h:1306
static ALLOCATOR_TYPE select_on_container_copy_construction(const ALLOCATOR_TYPE &rhs)
Definition bslma_allocatortraits.h:1532
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR_TYPE >::type size_type
Definition bslma_allocatortraits.h:1165
static void construct(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr, Args &&... arguments)
Definition bslma_allocatortraits.h:1472
static size_type max_size(const ALLOCATOR_TYPE &basicAllocator) BSLS_KEYWORD_NOEXCEPT
Definition bslma_allocatortraits.h:1515
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR_TYPE >::type pointer
Definition bslma_allocatortraits.h:1149
static void destroy(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr)
Definition bslma_allocatortraits.h:1494
BloombergLP::bslma::AllocatorTraits_IsAlwaysEqual< ALLOCATOR_TYPE >::type is_always_equal
Definition bslma_allocatortraits.h:1288
static void deallocate(ALLOCATOR_TYPE &basicAllocator, pointer elementAddr, size_type n)
Definition bslma_allocatortraits.h:1458
BloombergLP::bslma::AllocatorTraits_PropOnSwap< ALLOCATOR_TYPE >::type propagate_on_container_swap
Definition bslma_allocatortraits.h:1315
ALLOCATOR_TYPE allocator_type
Definition bslma_allocatortraits.h:1144
BloombergLP::bslma::AllocatorTraits_ConstVoidPointerType< ALLOCATOR_TYPE >::type const_void_pointer
Definition bslma_allocatortraits.h:1158
BloombergLP::bslma::AllocatorTraits_DifferenceType< ALLOCATOR_TYPE >::type difference_type
Definition bslma_allocatortraits.h:1162
ALLOCATOR_TYPE::value_type value_type
Definition bslma_allocatortraits.h:1145
polymorphic_allocator< ANY_TYPE > other
Definition bslma_polymorphicallocator.h:478