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.")
75struct BslAllocator_Voidish;
98template <class TYPE = polymorphic_allocator<>::value_type>
99class allocator :
public polymorphic_allocator<TYPE> {
102 typedef polymorphic_allocator<TYPE> Base;
103 typedef allocator_traits<Base> BaseTraits;
110 BloombergLP::bslmf::IsBitwiseCopyable);
112 BloombergLP::bslmf::IsBitwiseEqualityComparable);
133 template <
class ANY_TYPE>
136 typedef allocator<ANY_TYPE>
other;
158#ifdef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
171 template <
class ANY_TYPE>
223 template <
class ELEMENT_TYPE>
226#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
229#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
230#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT 14
232#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A
233#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
236#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 0
237 template <
class ELEMENT_TYPE,
class ARG1>
242#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 1
243 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
249#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 2
250 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
258#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 3
259 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
269#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 4
270 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
282#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 5
283 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
297#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 6
298 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
314#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 7
315 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
333#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 8
334 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
354#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 9
355 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
377#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 10
378 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
402#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 11
403 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
429#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 12
430 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
458#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 13
459 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
489#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 14
490 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
522#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 0
523 template <
class ELEMENT_TYPE,
class ARG1>
528#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 1
529 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
535#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 2
536 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
544#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 3
545 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
555#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 4
556 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
568#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 5
569 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
583#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 6
584 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
600#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 7
601 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
619#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 8
620 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
640#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 9
641 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
663#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 10
664 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
688#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 11
689 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
715#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 12
716 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
744#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 13
745 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
775#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_A >= 14
776 template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
812 template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
816 template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
825 template <
class ELEMENT_TYPE>
846 BloombergLP::bslma::Allocator *
mechanism()
const;
863 :
public allocator<BloombergLP::bslma::BslAllocator_Voidish>
867 typedef allocator<BloombergLP::bslma::BslAllocator_Voidish> Base;
881 BloombergLP::bslmf::IsBitwiseCopyable);
883 BloombergLP::bslmf::IsBitwiseEqualityComparable);
918#ifdef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
923 template <
class ANY_TYPE>
952struct allocator_traits<allocator<TYPE> > {
958 typedef typename allocator_type::pointer
pointer;
959 typedef typename allocator_type::const_pointer
const_pointer;
960 typedef typename allocator_type::void_pointer
void_pointer;
963 typedef typename allocator_type::size_type
size_type;
965#ifdef BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES
966 template <
class ELEMENT_TYPE>
967 using rebind_alloc = allocator<ELEMENT_TYPE>;
969 template <
class ELEMENT_TYPE>
970 using rebind_traits = allocator_traits<allocator<ELEMENT_TYPE> >;
972 template <
class ELEMENT_TYPE>
973 struct rebind_alloc : allocator<ELEMENT_TYPE> {
975 : allocator<ELEMENT_TYPE>()
982 template <
typename ARG>
984 : allocator<ELEMENT_TYPE>(allocatorArg)
989 template <
class ELEMENT_TYPE>
990 struct rebind_traits : allocator_traits<allocator<ELEMENT_TYPE> > {
996 return m.allocate(n);
1003 return m.allocate(n);
1011 template <
class TYPE2>
1018#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1021#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
1022#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT 14
1024#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B
1025#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
1027#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 0
1028 template <
class TYPE2,
class ARG1>
1038#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 1
1039 template <
class TYPE2,
class ARG1,
class ARGS_01>
1051#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 2
1052 template <
class TYPE2,
class ARG1,
class ARGS_01,
1067#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 3
1068 template <
class TYPE2,
class ARG1,
class ARGS_01,
1086#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 4
1087 template <
class TYPE2,
class ARG1,
class ARGS_01,
1108#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 5
1109 template <
class TYPE2,
class ARG1,
class ARGS_01,
1133#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 6
1134 template <
class TYPE2,
class ARG1,
class ARGS_01,
1161#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 7
1162 template <
class TYPE2,
class ARG1,
class ARGS_01,
1192#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 8
1193 template <
class TYPE2,
class ARG1,
class ARGS_01,
1226#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 9
1227 template <
class TYPE2,
class ARG1,
class ARGS_01,
1263#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 10
1264 template <
class TYPE2,
class ARG1,
class ARGS_01,
1303#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 11
1304 template <
class TYPE2,
class ARG1,
class ARGS_01,
1346#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 12
1347 template <
class TYPE2,
class ARG1,
class ARGS_01,
1392#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 13
1393 template <
class TYPE2,
class ARG1,
class ARGS_01,
1441#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 14
1442 template <
class TYPE2,
class ARG1,
class ARGS_01,
1494#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 0
1495 template <
class TYPE2,
class ARG1>
1505#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 1
1506 template <
class TYPE2,
class ARG1,
class ARGS_01>
1518#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 2
1519 template <
class TYPE2,
class ARG1,
class ARGS_01,
1534#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 3
1535 template <
class TYPE2,
class ARG1,
class ARGS_01,
1553#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 4
1554 template <
class TYPE2,
class ARG1,
class ARGS_01,
1575#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 5
1576 template <
class TYPE2,
class ARG1,
class ARGS_01,
1600#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 6
1601 template <
class TYPE2,
class ARG1,
class ARGS_01,
1628#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 7
1629 template <
class TYPE2,
class ARG1,
class ARGS_01,
1659#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 8
1660 template <
class TYPE2,
class ARG1,
class ARGS_01,
1693#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 9
1694 template <
class TYPE2,
class ARG1,
class ARGS_01,
1730#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 10
1731 template <
class TYPE2,
class ARG1,
class ARGS_01,
1770#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 11
1771 template <
class TYPE2,
class ARG1,
class ARGS_01,
1813#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 12
1814 template <
class TYPE2,
class ARG1,
class ARGS_01,
1859#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 13
1860 template <
class TYPE2,
class ARG1,
class ARGS_01,
1908#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_B >= 14
1909 template <
class TYPE2,
class ARG1,
class ARGS_01,
1963 template <
class TYPE2,
class ARG1,
class... ARGS>
1974 template <
class TYPE2,
class ARG1,
class... ARGS>
1987 template <
class ELEMENT_TYPE>
1996 return m.max_size();
2025template <
class TYPE>
2028: Base(BloombergLP::
bslma::Default::defaultAllocator())
2032template <
class TYPE>
2034allocator<TYPE>::allocator(BloombergLP::bslma::Allocator *mechanism)
2035: Base(BloombergLP::
bslma::Default::allocator(mechanism))
2039#ifndef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
2041template <
class TYPE>
2049template <
class TYPE>
2050template <
class ANY_TYPE>
2052allocator<TYPE>::allocator(
const allocator<ANY_TYPE>& original)
2059template <
class TYPE>
2062allocator<TYPE>::operator=(
const allocator& rhs)
2065 "'bsl::allocator' objects cannot be assigned");
2071 return *::new(
this) allocator(rhs);
2077template <class TYPE>
2079typename allocator<TYPE>::pointer
2080allocator<TYPE>::allocate(size_type n, const
void * )
2082 return Base::allocate(n);
2085template <
class TYPE>
2087void allocator<TYPE>::deallocate(TYPE *p, std::size_t n)
2089 Base::deallocate(p, n);
2092template <
class TYPE>
2093template <
class ELEMENT_TYPE>
2095void allocator<TYPE>::construct(ELEMENT_TYPE *address)
2097 BloombergLP::bslma::ConstructionUtil::construct(address, *
this);
2100#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
2103#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
2104#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT 14
2106#ifndef BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C
2107#define BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C BSLMA_BSLALLOCATOR_VARIADIC_LIMIT
2109#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 0
2110template <
class TYPE>
2111template <
class ELEMENT_TYPE,
class ARG1>
2113void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2116 BloombergLP::bslma::ConstructionUtil::construct(
2123#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 1
2124template <
class TYPE>
2125template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
2127void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2131 BloombergLP::bslma::ConstructionUtil::construct(
2139#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 2
2140template <
class TYPE>
2141template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2144void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2149 BloombergLP::bslma::ConstructionUtil::construct(
2158#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 3
2159template <
class TYPE>
2160template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2164void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2170 BloombergLP::bslma::ConstructionUtil::construct(
2180#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 4
2181template <
class TYPE>
2182template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2187void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2194 BloombergLP::bslma::ConstructionUtil::construct(
2205#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 5
2206template <
class TYPE>
2207template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2213void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2221 BloombergLP::bslma::ConstructionUtil::construct(
2233#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 6
2234template <
class TYPE>
2235template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2242void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2251 BloombergLP::bslma::ConstructionUtil::construct(
2264#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 7
2265template <
class TYPE>
2266template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2274void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2284 BloombergLP::bslma::ConstructionUtil::construct(
2298#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 8
2299template <
class TYPE>
2300template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2309void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2320 BloombergLP::bslma::ConstructionUtil::construct(
2335#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 9
2336template <
class TYPE>
2337template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2347void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2359 BloombergLP::bslma::ConstructionUtil::construct(
2375#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 10
2376template <
class TYPE>
2377template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2388void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2401 BloombergLP::bslma::ConstructionUtil::construct(
2418#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 11
2419template <
class TYPE>
2420template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2432void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2446 BloombergLP::bslma::ConstructionUtil::construct(
2464#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 12
2465template <
class TYPE>
2466template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2479void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2494 BloombergLP::bslma::ConstructionUtil::construct(
2513#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 13
2514template <
class TYPE>
2515template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2529void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2545 BloombergLP::bslma::ConstructionUtil::construct(
2565#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 14
2566template <
class TYPE>
2567template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2582void allocator<TYPE>::construct(ELEMENT_TYPE *address,
2599 BloombergLP::bslma::ConstructionUtil::construct(
2621#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 0
2622template <
class TYPE>
2623template <
class ELEMENT_TYPE,
class ARG1>
2625void allocator<TYPE>::construct(
2626 ELEMENT_TYPE *address,
2629 BloombergLP::bslma::ConstructionUtil::construct(
2636#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 1
2637template <
class TYPE>
2638template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01>
2640void allocator<TYPE>::construct(
2641 ELEMENT_TYPE *address,
2645 BloombergLP::bslma::ConstructionUtil::construct(
2653#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 2
2654template <
class TYPE>
2655template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2658void allocator<TYPE>::construct(
2659 ELEMENT_TYPE *address,
2664 BloombergLP::bslma::ConstructionUtil::construct(
2673#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 3
2674template <
class TYPE>
2675template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2679void allocator<TYPE>::construct(
2680 ELEMENT_TYPE *address,
2686 BloombergLP::bslma::ConstructionUtil::construct(
2696#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 4
2697template <
class TYPE>
2698template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2703void allocator<TYPE>::construct(
2704 ELEMENT_TYPE *address,
2711 BloombergLP::bslma::ConstructionUtil::construct(
2722#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 5
2723template <
class TYPE>
2724template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2730void allocator<TYPE>::construct(
2731 ELEMENT_TYPE *address,
2739 BloombergLP::bslma::ConstructionUtil::construct(
2751#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 6
2752template <
class TYPE>
2753template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2760void allocator<TYPE>::construct(
2761 ELEMENT_TYPE *address,
2770 BloombergLP::bslma::ConstructionUtil::construct(
2783#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 7
2784template <
class TYPE>
2785template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2793void allocator<TYPE>::construct(
2794 ELEMENT_TYPE *address,
2804 BloombergLP::bslma::ConstructionUtil::construct(
2818#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 8
2819template <
class TYPE>
2820template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2829void allocator<TYPE>::construct(
2830 ELEMENT_TYPE *address,
2841 BloombergLP::bslma::ConstructionUtil::construct(
2856#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 9
2857template <
class TYPE>
2858template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2868void allocator<TYPE>::construct(
2869 ELEMENT_TYPE *address,
2881 BloombergLP::bslma::ConstructionUtil::construct(
2897#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 10
2898template <
class TYPE>
2899template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2910void allocator<TYPE>::construct(
2911 ELEMENT_TYPE *address,
2924 BloombergLP::bslma::ConstructionUtil::construct(
2941#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 11
2942template <
class TYPE>
2943template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
2955void allocator<TYPE>::construct(
2956 ELEMENT_TYPE *address,
2970 BloombergLP::bslma::ConstructionUtil::construct(
2988#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 12
2989template <
class TYPE>
2990template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
3003void allocator<TYPE>::construct(
3004 ELEMENT_TYPE *address,
3019 BloombergLP::bslma::ConstructionUtil::construct(
3038#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 13
3039template <
class TYPE>
3040template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
3054void allocator<TYPE>::construct(
3055 ELEMENT_TYPE *address,
3071 BloombergLP::bslma::ConstructionUtil::construct(
3091#if BSLMA_BSLALLOCATOR_VARIADIC_LIMIT_C >= 14
3092template <
class TYPE>
3093template <
class ELEMENT_TYPE,
class ARG1,
class ARGS_01,
3108void allocator<TYPE>::construct(
3109 ELEMENT_TYPE *address,
3126 BloombergLP::bslma::ConstructionUtil::construct(
3150template <
class TYPE>
3151template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
3153void allocator<TYPE>::construct(ELEMENT_TYPE *address,
3157 BloombergLP::bslma::ConstructionUtil::construct(
3164template <
class TYPE>
3165template <
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
3167void allocator<TYPE>::construct(
3168 ELEMENT_TYPE *address,
3172 BloombergLP::bslma::ConstructionUtil::construct(
3181template <
class TYPE>
3182template <
class ELEMENT_TYPE>
3184void allocator<TYPE>::destroy(ELEMENT_TYPE *address)
3186 BloombergLP::bslma::DestructionUtil::destroy(address);
3191template <
class TYPE>
3193typename allocator<TYPE>::pointer
3194allocator<TYPE>::address(reference x)
const
3196 return BloombergLP::bsls::Util::addressOf(x);
3199template <
class TYPE>
3201typename allocator<TYPE>::const_pointer
3202allocator<TYPE>::address(const_reference x)
const
3204 return BloombergLP::bsls::Util::addressOf(x);
3207template <
class TYPE>
3209typename allocator<TYPE>::size_type allocator<TYPE>::max_size()
const
3216 return ~size_type(0) /
sizeof(TYPE);
3219template <
class TYPE>
3221BloombergLP::bslma::Allocator *allocator<TYPE>::mechanism()
const
3223 return static_cast<BloombergLP::bslma::Allocator *
>(this->resource());
3226template <
class TYPE>
3228allocator<TYPE> allocator<TYPE>::select_on_container_copy_construction()
const
3239allocator<void>::allocator()
3244allocator<void>::allocator(BloombergLP::bslma::Allocator *mechanism)
3249#ifndef BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS
3258template <
class ANY_TYPE>
3260allocator<void>::allocator(
const allocator<ANY_TYPE>& original)
3267allocator<void> allocator<void>::select_on_container_copy_construction()
const
3269 return allocator<void>();
3274#if BSLS_PLATFORM_CMP_MSVC
3291template <
class TYPE>
3294 BloombergLP::bslma::Allocator *b)
3299template <
class TYPE>
3301bool operator==(BloombergLP::bslma::Allocator *a,
3307template <
class TYPE>
3310 BloombergLP::bslma::Allocator *b)
3315template <
class TYPE>
3317bool operator!=(BloombergLP::bslma::Allocator *a,
3333template <
class TYPE>
3339template <
class TYPE>
3353# 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:588
value_type & reference
Definition bslma_bslallocator.h:605
BloombergLP::bslma::Allocator * mechanism() const
Definition bslma_bslallocator.h:1146
void destroy(ELEMENT_TYPE *address)
Definition bslma_bslallocator.h:1109
BaseTraits::const_pointer const_pointer
Definition bslma_bslallocator.h:610
TYPE value_type
Definition bslma_bslallocator.h:604
value_type const & const_reference
Definition bslma_bslallocator.h:606
BaseTraits::pointer pointer
Definition bslma_bslallocator.h:609
BSLMA_BSLALLOCATOR_DEPRECATE_ASSIGN allocator & operator=(const allocator &rhs)
Definition bslma_bslallocator.h:1037
void deallocate(TYPE *p, std::size_t n=1)
Definition bslma_bslallocator.h:1062
void construct(ELEMENT_TYPE *address)
Definition bslma_bslallocator.h:1070
BSLS_ANNOTATION_NODISCARD pointer allocate(size_type n, const void *hint=0)
Definition bslma_bslallocator.h:1055
BaseTraits::void_pointer void_pointer
Definition bslma_bslallocator.h:611
pointer address(reference x) const
Definition bslma_bslallocator.h:1119
allocator select_on_container_copy_construction() const
Return a default-constructed allocator.
Definition bslma_bslallocator.h:1153
BaseTraits::const_void_pointer const_void_pointer
Definition bslma_bslallocator.h:612
BaseTraits::difference_type difference_type
Definition bslma_bslallocator.h:608
BSLS_KEYWORD_CONSTEXPR size_type max_size() const
Definition bslma_bslallocator.h:1134
allocator()
Definition bslma_bslallocator.h:1002
BaseTraits::size_type size_type
Definition bslma_bslallocator.h:607
bool is_equal(const memory_resource &other) const BSLS_KEYWORD_NOEXCEPT
Definition bslma_memoryresource.h:563
memory_resource * resource() const
Return the address of the memory resource supplied on construction.
Definition bslma_polymorphicallocator.h:1074
#define BSLMA_BSLALLOCATOR_DEPRECATE_ASSIGN
Definition bslma_bslallocator.h:554
#define BSLS_ANNOTATION_NODISCARD
Definition bsls_annotation.h:368
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2349
#define BSLS_KEYWORD_CONSTEXPR
Definition bsls_keyword.h:624
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
#define BSLS_REVIEW_OPT(X)
Definition bsls_review.h:1060
bool operator!=(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
bool operator==(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
Definition bdlat_valuetypefunctions.h:939
integral_constant< bool, false > false_type
Definition bslmf_integralconstant.h:290
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
Definition baljsn_encoder_testtypes.h:76
allocator< ANY_TYPE > other
Definition bslma_bslallocator.h:625
rebind_alloc(const ARG &allocatorArg)
Definition bslma_allocatortraits.h:1224
static pointer allocate(ALLOCATOR_TYPE &basicAllocator, size_type n)
Return basicAllocator.allocate(n).
Definition bslma_allocatortraits.h:1494
BloombergLP::bslma::AllocatorTraits_ConstPointerType< ALLOCATOR_TYPE >::type const_pointer
Definition bslma_allocatortraits.h:1183
BloombergLP::bslma::AllocatorTraits_VoidPointerType< ALLOCATOR_TYPE >::type void_pointer
Definition bslma_allocatortraits.h:1186
BloombergLP::bslma::AllocatorTraits_PropOnCopyAssign< ALLOCATOR_TYPE >::type propagate_on_container_copy_assignment
Definition bslma_allocatortraits.h:1332
BloombergLP::bslma::AllocatorTraits_PropOnMoveAssign< ALLOCATOR_TYPE >::type propagate_on_container_move_assignment
Definition bslma_allocatortraits.h:1341
static ALLOCATOR_TYPE select_on_container_copy_construction(const ALLOCATOR_TYPE &rhs)
Definition bslma_allocatortraits.h:1587
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR_TYPE >::type size_type
Definition bslma_allocatortraits.h:1196
static void construct(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr, Args &&... arguments)
Definition bslma_allocatortraits.h:1527
static size_type max_size(const ALLOCATOR_TYPE &basicAllocator) BSLS_KEYWORD_NOEXCEPT
Definition bslma_allocatortraits.h:1570
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR_TYPE >::type pointer
Definition bslma_allocatortraits.h:1180
static void destroy(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr)
Definition bslma_allocatortraits.h:1549
BloombergLP::bslma::AllocatorTraits_IsAlwaysEqual< ALLOCATOR_TYPE >::type is_always_equal
Definition bslma_allocatortraits.h:1323
static void deallocate(ALLOCATOR_TYPE &basicAllocator, pointer elementAddr, size_type n)
Definition bslma_allocatortraits.h:1513
BloombergLP::bslma::AllocatorTraits_PropOnSwap< ALLOCATOR_TYPE >::type propagate_on_container_swap
Definition bslma_allocatortraits.h:1350
ALLOCATOR_TYPE allocator_type
Definition bslma_allocatortraits.h:1175
BloombergLP::bslma::AllocatorTraits_ConstVoidPointerType< ALLOCATOR_TYPE >::type const_void_pointer
Definition bslma_allocatortraits.h:1189
BloombergLP::bslma::AllocatorTraits_DifferenceType< ALLOCATOR_TYPE >::type difference_type
Definition bslma_allocatortraits.h:1193
ALLOCATOR_TYPE::value_type value_type
Definition bslma_allocatortraits.h:1176
Definition bslmf_integralconstant.h:261