11#ifndef INCLUDED_BSLMA_BSLALLOCATOR_CPP03
12#define INCLUDED_BSLMA_BSLALLOCATOR_CPP03
63#ifdef COMPILING_BSLMA_BSLALLOCATOR_H
65#define BSLMA_BSLALLOCATOR_DEPRECATE_ASSIGN \
66 BSLS_DEPRECATE_FEATURE("bsl", "bsl_allocator_assign", \
67 "Do not assign allocators.")
73struct BslAllocator_Voidish;
97template <class TYPE = polymorphic_allocator<>::value_type>
98class allocator :
public polymorphic_allocator<TYPE> {
101 typedef polymorphic_allocator<TYPE> Base;
102 typedef allocator_traits<Base> BaseTraits;
109 BloombergLP::bslmf::IsBitwiseCopyable);
111 BloombergLP::bslmf::IsBitwiseEqualityComparable);
129 template <
class ANY_TYPE>
132 typedef allocator<ANY_TYPE>
other;
154#ifdef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
167 template <
class ANY_TYPE>
214 template <
class ELEMENT_TYPE>
217#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
220#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
221#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT 14
223#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A
224#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
227#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 0
228 template <
class ELEMENT_TYPE,
class ARG1>
233#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 1
234 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
240#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 2
241 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
249#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 3
250 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
260#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 4
261 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
273#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 5
274 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
288#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 6
289 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
305#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 7
306 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
324#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 8
325 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
345#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 9
346 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
368#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 10
369 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
393#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 11
394 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
420#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 12
421 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
449#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 13
450 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
480#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 14
481 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
513#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 0
514 template <
class ELEMENT_TYPE,
class ARG1>
519#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 1
520 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
526#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 2
527 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
535#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 3
536 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
546#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 4
547 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
559#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 5
560 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
574#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 6
575 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
591#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 7
592 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
610#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 8
611 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
631#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 9
632 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
654#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 10
655 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
679#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 11
680 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
706#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 12
707 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
735#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 13
736 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
766#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 14
767 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
803 template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
807 template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
816 template <
class ELEMENT_TYPE>
836 BloombergLP::bslma::Allocator *
mechanism()
const;
852 :
public allocator<BloombergLP::bslma::BslAllocator_Voidish>
856 typedef allocator<BloombergLP::bslma::BslAllocator_Voidish> Base;
870 BloombergLP::bslmf::IsBitwiseCopyable);
872 BloombergLP::bslmf::IsBitwiseEqualityComparable);
900#ifdef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
912 template <
class ANY_TYPE>
938struct allocator_traits<allocator<TYPE> > {
944 typedef typename allocator_type::pointer
pointer;
945 typedef typename allocator_type::const_pointer
const_pointer;
946 typedef typename allocator_type::void_pointer
void_pointer;
949 typedef typename allocator_type::size_type
size_type;
951#ifdef BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES
952 template <
class ELEMENT_TYPE>
953 using rebind_alloc = allocator<ELEMENT_TYPE>;
955 template <
class ELEMENT_TYPE>
956 using rebind_traits = allocator_traits<allocator<ELEMENT_TYPE> >;
958 template <
class ELEMENT_TYPE>
959 struct rebind_alloc : allocator<ELEMENT_TYPE> {
961 : allocator<ELEMENT_TYPE>()
968 template <
typename ARG>
970 : allocator<ELEMENT_TYPE>(allocatorArg)
975 template <
class ELEMENT_TYPE>
976 struct rebind_traits : allocator_traits<allocator<ELEMENT_TYPE> > {
982 return m.allocate(n);
989 return m.allocate(n);
997 template <
class TYPE2>
1004#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1007#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
1008#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT 14
1010#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B
1011#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
1013#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 0
1014 template <
class TYPE2,
class ARG1>
1024#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 1
1025 template <
class TYPE2,
class ARG1,
class ARGS_01>
1037#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 2
1038 template <
class TYPE2,
class ARG1,
class ARGS_01,
1053#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 3
1054 template <
class TYPE2,
class ARG1,
class ARGS_01,
1072#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 4
1073 template <
class TYPE2,
class ARG1,
class ARGS_01,
1094#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 5
1095 template <
class TYPE2,
class ARG1,
class ARGS_01,
1119#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 6
1120 template <
class TYPE2,
class ARG1,
class ARGS_01,
1147#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 7
1148 template <
class TYPE2,
class ARG1,
class ARGS_01,
1178#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 8
1179 template <
class TYPE2,
class ARG1,
class ARGS_01,
1212#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 9
1213 template <
class TYPE2,
class ARG1,
class ARGS_01,
1249#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 10
1250 template <
class TYPE2,
class ARG1,
class ARGS_01,
1289#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 11
1290 template <
class TYPE2,
class ARG1,
class ARGS_01,
1332#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 12
1333 template <
class TYPE2,
class ARG1,
class ARGS_01,
1378#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 13
1379 template <
class TYPE2,
class ARG1,
class ARGS_01,
1427#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 14
1428 template <
class TYPE2,
class ARG1,
class ARGS_01,
1480#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 0
1481 template <
class TYPE2,
class ARG1>
1491#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 1
1492 template <
class TYPE2,
class ARG1,
class ARGS_01>
1504#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 2
1505 template <
class TYPE2,
class ARG1,
class ARGS_01,
1520#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 3
1521 template <
class TYPE2,
class ARG1,
class ARGS_01,
1539#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 4
1540 template <
class TYPE2,
class ARG1,
class ARGS_01,
1561#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 5
1562 template <
class TYPE2,
class ARG1,
class ARGS_01,
1586#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 6
1587 template <
class TYPE2,
class ARG1,
class ARGS_01,
1614#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 7
1615 template <
class TYPE2,
class ARG1,
class ARGS_01,
1645#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 8
1646 template <
class TYPE2,
class ARG1,
class ARGS_01,
1679#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 9
1680 template <
class TYPE2,
class ARG1,
class ARGS_01,
1716#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 10
1717 template <
class TYPE2,
class ARG1,
class ARGS_01,
1756#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 11
1757 template <
class TYPE2,
class ARG1,
class ARGS_01,
1799#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 12
1800 template <
class TYPE2,
class ARG1,
class ARGS_01,
1845#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 13
1846 template <
class TYPE2,
class ARG1,
class ARGS_01,
1894#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 14
1895 template <
class TYPE2,
class ARG1,
class ARGS_01,
1949 template <
class TYPE2,
class ARG1,
class... ARGS>
1960 template <
class TYPE2,
class ARG1,
class... ARGS>
1973 template <
class ELEMENT_TYPE>
1982 return m.max_size();
2011template <
class TYPE>
2014: Base(BloombergLP::
bslma::Default::defaultAllocator())
2018template <
class TYPE>
2020allocator<TYPE>::allocator(BloombergLP::bslma::Allocator *mechanism)
2021: Base(BloombergLP::
bslma::Default::allocator(mechanism))
2025#ifndef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
2027template <
class TYPE>
2035template <
class TYPE>
2036template <
class ANY_TYPE>
2038allocator<TYPE>::allocator(
const allocator<ANY_TYPE>& original)
2045template <
class TYPE>
2048allocator<TYPE>::operator=(
const allocator& rhs)
2051 "'bsl::allocator' objects cannot be assigned");
2057 return *::new(
this) allocator(rhs);
2063template <class TYPE>
2065typename allocator<TYPE>::pointer
2066allocator<TYPE>::allocate(size_type n, const
void * )
2068 return Base::allocate(n);
2071template <
class TYPE>
2073void allocator<TYPE>::deallocate(TYPE *p, std::size_t n)
2075 Base::deallocate(p, n);
2078template <
class TYPE>
2079template <
class ELEMENT_TYPE>
2081void allocator<TYPE>::construct(ELEMENT_TYPE *address)
2083 BloombergLP::bslma::ConstructionUtil::construct(address, *
this);
2086#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
2089#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
2090#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT 14
2092#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C
2093#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
2095#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 0
2096template <
class TYPE>
2097template <
class ELEMENT_TYPE,
class ARG1>
2099void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2102 BloombergLP::bslma::ConstructionUtil::construct(
2109#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 1
2110template <
class TYPE>
2111template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
2113void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2117 BloombergLP::bslma::ConstructionUtil::construct(
2125#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 2
2126template <
class TYPE>
2127template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2130void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2135 BloombergLP::bslma::ConstructionUtil::construct(
2144#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 3
2145template <
class TYPE>
2146template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2150void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2156 BloombergLP::bslma::ConstructionUtil::construct(
2166#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 4
2167template <
class TYPE>
2168template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2173void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2180 BloombergLP::bslma::ConstructionUtil::construct(
2191#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 5
2192template <
class TYPE>
2193template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2199void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2207 BloombergLP::bslma::ConstructionUtil::construct(
2219#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 6
2220template <
class TYPE>
2221template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2228void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2237 BloombergLP::bslma::ConstructionUtil::construct(
2250#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 7
2251template <
class TYPE>
2252template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2260void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2270 BloombergLP::bslma::ConstructionUtil::construct(
2284#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 8
2285template <
class TYPE>
2286template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2295void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2306 BloombergLP::bslma::ConstructionUtil::construct(
2321#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 9
2322template <
class TYPE>
2323template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2333void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2345 BloombergLP::bslma::ConstructionUtil::construct(
2361#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 10
2362template <
class TYPE>
2363template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2374void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2387 BloombergLP::bslma::ConstructionUtil::construct(
2404#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 11
2405template <
class TYPE>
2406template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2418void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2432 BloombergLP::bslma::ConstructionUtil::construct(
2450#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 12
2451template <
class TYPE>
2452template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2465void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2480 BloombergLP::bslma::ConstructionUtil::construct(
2499#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 13
2500template <
class TYPE>
2501template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2515void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2531 BloombergLP::bslma::ConstructionUtil::construct(
2551#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 14
2552template <
class TYPE>
2553template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2568void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2585 BloombergLP::bslma::ConstructionUtil::construct(
2607#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 0
2608template <
class TYPE>
2609template <
class ELEMENT_TYPE,
class ARG1>
2611void allocator<TYPE>::construct(
2612 ELEMENT_TYPE *address,
2615 BloombergLP::bslma::ConstructionUtil::construct(
2622#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 1
2623template <
class TYPE>
2624template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
2626void allocator<TYPE>::construct(
2627 ELEMENT_TYPE *address,
2631 BloombergLP::bslma::ConstructionUtil::construct(
2639#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 2
2640template <
class TYPE>
2641template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2644void allocator<TYPE>::construct(
2645 ELEMENT_TYPE *address,
2650 BloombergLP::bslma::ConstructionUtil::construct(
2659#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 3
2660template <
class TYPE>
2661template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2665void allocator<TYPE>::construct(
2666 ELEMENT_TYPE *address,
2672 BloombergLP::bslma::ConstructionUtil::construct(
2682#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 4
2683template <
class TYPE>
2684template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2689void allocator<TYPE>::construct(
2690 ELEMENT_TYPE *address,
2697 BloombergLP::bslma::ConstructionUtil::construct(
2708#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 5
2709template <
class TYPE>
2710template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2716void allocator<TYPE>::construct(
2717 ELEMENT_TYPE *address,
2725 BloombergLP::bslma::ConstructionUtil::construct(
2737#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 6
2738template <
class TYPE>
2739template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2746void allocator<TYPE>::construct(
2747 ELEMENT_TYPE *address,
2756 BloombergLP::bslma::ConstructionUtil::construct(
2769#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 7
2770template <
class TYPE>
2771template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2779void allocator<TYPE>::construct(
2780 ELEMENT_TYPE *address,
2790 BloombergLP::bslma::ConstructionUtil::construct(
2804#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 8
2805template <
class TYPE>
2806template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2815void allocator<TYPE>::construct(
2816 ELEMENT_TYPE *address,
2827 BloombergLP::bslma::ConstructionUtil::construct(
2842#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 9
2843template <
class TYPE>
2844template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2854void allocator<TYPE>::construct(
2855 ELEMENT_TYPE *address,
2867 BloombergLP::bslma::ConstructionUtil::construct(
2883#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 10
2884template <
class TYPE>
2885template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2896void allocator<TYPE>::construct(
2897 ELEMENT_TYPE *address,
2910 BloombergLP::bslma::ConstructionUtil::construct(
2927#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 11
2928template <
class TYPE>
2929template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2941void allocator<TYPE>::construct(
2942 ELEMENT_TYPE *address,
2956 BloombergLP::bslma::ConstructionUtil::construct(
2974#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 12
2975template <
class TYPE>
2976template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2989void allocator<TYPE>::construct(
2990 ELEMENT_TYPE *address,
3005 BloombergLP::bslma::ConstructionUtil::construct(
3024#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 13
3025template <
class TYPE>
3026template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
3040void allocator<TYPE>::construct(
3041 ELEMENT_TYPE *address,
3057 BloombergLP::bslma::ConstructionUtil::construct(
3077#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 14
3078template <
class TYPE>
3079template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
3094void allocator<TYPE>::construct(
3095 ELEMENT_TYPE *address,
3112 BloombergLP::bslma::ConstructionUtil::construct(
3136template <
class TYPE>
3137template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
3139void allocator<TYPE>::construct(ELEMENT_TYPE *address,
3143 BloombergLP::bslma::ConstructionUtil::construct(
3150template <
class TYPE>
3151template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
3153void allocator<TYPE>::construct(
3154 ELEMENT_TYPE *address,
3158 BloombergLP::bslma::ConstructionUtil::construct(
3167template <
class TYPE>
3168template <
class ELEMENT_TYPE>
3170void allocator<TYPE>::destroy(ELEMENT_TYPE *address)
3172 BloombergLP::bslma::DestructionUtil::destroy(address);
3177template <
class TYPE>
3179typename allocator<TYPE>::pointer
3180allocator<TYPE>::address(reference x)
const
3182 return BloombergLP::bsls::Util::addressOf(x);
3185template <
class TYPE>
3187typename allocator<TYPE>::const_pointer
3188allocator<TYPE>::address(const_reference x)
const
3190 return BloombergLP::bsls::Util::addressOf(x);
3193template <
class TYPE>
3195typename allocator<TYPE>::size_type allocator<TYPE>::max_size()
const
3201 const size_type MAX_NUM_BYTES = ~size_type(0);
3203 const size_type MAX_NUM_ELEMENTS = MAX_NUM_BYTES /
sizeof(TYPE);
3205 return MAX_NUM_ELEMENTS;
3208template <
class TYPE>
3210BloombergLP::bslma::Allocator *allocator<TYPE>::mechanism()
const
3212 return static_cast<BloombergLP::bslma::Allocator *
>(this->resource());
3215template <
class TYPE>
3217allocator<TYPE> allocator<TYPE>::select_on_container_copy_construction()
const
3229allocator<void>::allocator()
3234allocator<void>::allocator(BloombergLP::bslma::Allocator *mechanism)
3239#ifndef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
3248template <
class ANY_TYPE>
3250allocator<void>::allocator(
const allocator<ANY_TYPE>& original)
3257allocator<void> allocator<void>::select_on_container_copy_construction()
const
3259 return allocator<void>();
3264#if BSLS_PLATFORM_CMP_MSVC
3281template <
class TYPE>
3284 BloombergLP::bslma::Allocator *b)
3289template <
class TYPE>
3291bool operator==(BloombergLP::bslma::Allocator *a,
3297template <
class TYPE>
3300 BloombergLP::bslma::Allocator *b)
3305template <
class TYPE>
3307bool operator!=(BloombergLP::bslma::Allocator *a,
3323template <
class TYPE>
3329template <
class TYPE>
3343# error Not valid except when included from bslma_bslallocator.h
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
Definition bslma_bslallocator.h:580
value_type & reference
Definition bslma_bslallocator.h:597
BloombergLP::bslma::Allocator * mechanism() const
Definition bslma_bslallocator.h:1126
void destroy(ELEMENT_TYPE *address)
Definition bslma_bslallocator.h:1086
BaseTraits::const_pointer const_pointer
Definition bslma_bslallocator.h:602
TYPE value_type
Definition bslma_bslallocator.h:596
value_type const & const_reference
Definition bslma_bslallocator.h:598
BaseTraits::pointer pointer
Definition bslma_bslallocator.h:601
BSLMA_BSLALLOCATOR_DEPRECATE_ASSIGN allocator & operator=(const allocator &rhs)
Definition bslma_bslallocator.h:1014
void deallocate(TYPE *p, std::size_t n=1)
Definition bslma_bslallocator.h:1039
void construct(ELEMENT_TYPE *address)
Definition bslma_bslallocator.h:1047
BSLS_ANNOTATION_NODISCARD pointer allocate(size_type n, const void *hint=0)
Definition bslma_bslallocator.h:1032
BaseTraits::void_pointer void_pointer
Definition bslma_bslallocator.h:603
pointer address(reference x) const
Definition bslma_bslallocator.h:1096
allocator select_on_container_copy_construction() const
Return a default-constructed allocator.
Definition bslma_bslallocator.h:1133
BaseTraits::const_void_pointer const_void_pointer
Definition bslma_bslallocator.h:604
BaseTraits::difference_type difference_type
Definition bslma_bslallocator.h:600
BSLS_KEYWORD_CONSTEXPR size_type max_size() const
Definition bslma_bslallocator.h:1111
allocator()
Definition bslma_bslallocator.h:979
BaseTraits::size_type size_type
Definition bslma_bslallocator.h:599
bool is_equal(const memory_resource &other) const BSLS_KEYWORD_NOEXCEPT
Definition bslma_memoryresource.h:554
memory_resource * resource() const
Return the address of the memory resource supplied on construction.
Definition bslma_polymorphicallocator.h:1048
#define BSLMA_BSLALLOCATOR_DEPRECATE_ASSIGN
Definition bslma_bslallocator.h:547
#define BSLS_ANNOTATION_NODISCARD
Definition bsls_annotation.h:373
#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_NOEXCEPT
Definition bsls_keyword.h:632
#define BSLS_REVIEW_OPT(X)
Definition bsls_review.h:977
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
Definition balxml_encoderoptions.h:68
allocator< ANY_TYPE > other
Definition bslma_bslallocator.h:614
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
Definition bslmf_integralconstant.h:244