[#bsl-allocator_traits-0108]
= xref:bsl.adoc[bsl]::allocator&lowbar;traits
:relfileprefix: ../
:mrdocs:

This class supports the complete interface of the C&plus;&plus;11 `allocator&lowbar;traits` class template, which provides a uniform mechanism for accessing nested types within, and operations on, any standard&hyphen;conforming allocator&period; A specialization of this class template for `bsl&colon;&colon;allocator` provides support for Bloomberg&apos;s `bslma` allocator model (see the `bslma&lowbar;bslallocator` component for more details)&period; In C&plus;&plus;11 compilation environments, the `construct` methods forward to the allocator&apos;s `construct` method if such a method matching the (variable number of) specified constructor arguments exists&semi; otherwise, the `construct` method falls back to invoking the constructor of the element type directly&period; In C&plus;&plus;03 compilation environments, there is no reliable way to detect if the type provide a method that matches a (variable number of) specified arguments&semi; therefore, we require that standard allocator types define `construct` methods taking a variable number of arguments in those environments&period; This implementation is not fully&hyphen;standard&hyphen;conforming in that it does not support deduce data types that are not specified in the allocator&period;

== Synopsis

Declared in `&lt;bslma&lowbar;allocatortraits&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&lowbar;TYPE&gt;
struct allocator&lowbar;traits;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/allocator_traits-0108/allocator_type.adoc[`allocator&lowbar;type`] 
| This `typedef` is an alias to the (template parameter) `ALLOCATOR&lowbar;TYPE`&period;
| xref:bsl/allocator_traits-0108/const_pointer.adoc[`const&lowbar;pointer`] 
| This `typedef` is an alias to `AllocatorTraits&lowbar;ConstPointerType&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;type`&period;
| xref:bsl/allocator_traits-0108/const_void_pointer.adoc[`const&lowbar;void&lowbar;pointer`] 
| Const void pointer type for the allocator&period;
| xref:bsl/allocator_traits-0108/difference_type.adoc[`difference&lowbar;type`] 
| This `typedef` is an alias to `AllocatorTraits&lowbar;DifferenceType&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;type`&period;
| xref:bsl/allocator_traits-0108/is_always_equal.adoc[`is&lowbar;always&lowbar;equal`] 
| Identical to, or derived from `true&lowbar;type` if two allocators of parameterized `ALLOCATOR&lowbar;TYPE` always compare equal&semi; otherwise identical to or derived from `false&lowbar;type`&period; This type is `ALLOCATOR&lowbar;TYPE&colon;&colon;is&lowbar;always&lowbar;equal` if such a type is defined, and `is&lowbar;empty&lt;ALLOCATOR&lowbar;TYPE&gt;` otherwise&period;
| xref:bsl/allocator_traits-0108/pointer.adoc[`pointer`] 
| This `typedef` is an alias to `AllocatorTraits&lowbar;PointerType&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;type`&period;
| xref:bsl/allocator_traits-0108/propagate_on_container_copy_assignment.adoc[`propagate&lowbar;on&lowbar;container&lowbar;copy&lowbar;assignment`] 
| Identical to, or derived from `true&lowbar;type` if an allocator of parameterized `ALLOCATOR&lowbar;TYPE` should be copied when a container using that `ALLOCATOR&lowbar;TYPE` is copy&hyphen;assigned&semi; otherwise identical to or derived from `false&lowbar;type`&period; This type is `ALLOCATOR&lowbar;TYPE&colon;&colon;propagate&lowbar;on&lowbar;container&lowbar;copy&lowbar;assignment` if such a type is defined, and `false&lowbar;type` otherwise&period;
| xref:bsl/allocator_traits-0108/propagate_on_container_move_assignment.adoc[`propagate&lowbar;on&lowbar;container&lowbar;move&lowbar;assignment`] 
| Identical to, or derived from `true&lowbar;type` if an allocator of parameterized `ALLOCATOR&lowbar;TYPE` should be moved when a container using that `ALLOCATOR&lowbar;TYPE` is move&hyphen;assigned&semi; otherwise identical to or derived from `false&lowbar;type`&period; This type is `ALLOCATOR&lowbar;TYPE&colon;&colon;propagate&lowbar;on&lowbar;container&lowbar;move&lowbar;assignment` if such a type is defined, and `false&lowbar;type` otherwise&period;
| xref:bsl/allocator_traits-0108/propagate_on_container_swap.adoc[`propagate&lowbar;on&lowbar;container&lowbar;swap`] 
| Identical to, or derived from `true&lowbar;type` if the allocators of parameterized `ALLOCATOR&lowbar;TYPE` should be swapped when containers using that `ALLOCATOR&lowbar;TYPE` are swapped&semi; otherwise identical to or derived from `false&lowbar;type`&period; This type is `ALLOCATOR&lowbar;TYPE&colon;&colon;propagate&lowbar;on&lowbar;container&lowbar;swap` if such a type is defined, and `false&lowbar;type` otherwise&period;
| xref:bsl/allocator_traits-0108/rebind_alloc.adoc[`rebind&lowbar;alloc`] 
| Rebind this allocator to the specified `ELEMENT&lowbar;TYPE`&period;
| xref:bsl/allocator_traits-0108/rebind_traits.adoc[`rebind&lowbar;traits`] 
| Rebind this allocator traits type to the specified `ELEMENT&lowbar;TYPE`&period;
| xref:bsl/allocator_traits-0108/size_type.adoc[`size&lowbar;type`] 
| This `typedef` is an alias to `AllocatorTraits&lowbar;SizeType&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;type`&period;
| xref:bsl/allocator_traits-0108/value_type.adoc[`value&lowbar;type`] 
| This `typedef` is an alias to `ALLOCATOR&lowbar;TYPE&colon;&colon;value&lowbar;type`&period;
| xref:bsl/allocator_traits-0108/void_pointer.adoc[`void&lowbar;pointer`] 
| This `typedef` is an alias to `AllocatorTraits&lowbar;VoidPointerType&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;type`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/allocator_traits-0108/allocate-03.adoc[`allocate`] 
| `allocate` overloads
| xref:bsl/allocator_traits-0108/construct.adoc[`construct`] 
| Construct an object of (template parameter) type `ELEMENT&lowbar;TYPE` at the specified `elementAddr`, either by 1) calling the `construct` method on `basicAllocator` with `elemAddr` and the specified (variable number of) `arguments` if the (template parameter) type `ALLOCATOR&lowbar;TYPE` defines such a method, or 2) forwarding the specified (variable number of) `arguments` to the constructor of `ELEMENT&lowbar;TYPE` directly (and ignoring `basicAllocator`) otherwise&period; The behavior is undefined unless `elementAddr` refers to valid, uninitialized storage&period;
| xref:bsl/allocator_traits-0108/deallocate.adoc[`deallocate`] 
| Invoke `basicAllocator&period;deallocate(elementAddr, n)`&period; The behavior is undefined unless the specified `elementAddr` was returned from a prior call to the `allocate` method of an allocator that compares equal to the specified `allocator`, and has not yet been passed to a `deallocate` call of such an allocator object&period;
| xref:bsl/allocator_traits-0108/destroy.adoc[`destroy`] 
| Destroy the object of (template parameter) type `ELEMENT&lowbar;TYPE` at the specified `elementAddr`, either by 1) calling the `destroy` method on `basicAllocator` with `elemAddr` as the sole argument if the (template parameter) type `ALLOCATOR&lowbar;TYPE` defines such a method, or 2) calling the destructor directly on `elementAddr` (and ignoring `basicAllocator`) otherwise&period; The behavior is undefined unless `elementAddr` refers to a valid, constructed object&period;
| xref:bsl/allocator_traits-0108/max_size.adoc[`max&lowbar;size`] 
| Return the largest number of `value&lowbar;type` objects that could reasonably be returned by a single invocation of `allocate` for the specified `allocator`, i&period;e&period;, `allocator&period;max&lowbar;size()`&period;
| xref:bsl/allocator_traits-0108/select_on_container_copy_construction.adoc[`select&lowbar;on&lowbar;container&lowbar;copy&lowbar;construction`] 
| Return a copy of the allocator that should be used to copy&hyphen; construct one container from another container whose allocator is the specified `rhs`&period; If the parameterized `ALLOCATOR&lowbar;TYPE` defines a method `select&lowbar;on&lowbar;container&lowbar;copy&lowbar;construction`, this function returns the result of calling that method on `rhs`&semi; otherwise, this method enforces the default policy of propagating the allocator on copy construction, as is standard practice for standard allocators (i&period;e&period;, returns `rhs`)&period; Note that the specialization of this class template for `bsl&colon;&colon;allocator` (in the `bslma&lowbar;bslallocator` component) provides the alternate default behavior of _not_ propagating the allocator on copy construction (i&period;e&period;, returning a default&hyphen;constructed allocator object)&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:bsl/allocator_traits-07c.adoc[`allocator&lowbar;traits&lt;allocator&lt;Attribute&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-056.adoc[`allocator&lowbar;traits&lt;allocator&lt;Json&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-010c.adoc[`allocator&lowbar;traits&lt;allocator&lt;ManagedAttribute&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-04e.adoc[`allocator&lowbar;traits&lt;allocator&lt;MetricSampleGroup&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-06c.adoc[`allocator&lowbar;traits&lt;allocator&lt;UserFieldValue&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-046.adoc[`allocator&lowbar;traits&lt;allocator&lt;ZoneinfoTransition&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-015.adoc[`allocator&lowbar;traits&lt;allocator&lt;bool&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0f26.adoc[`allocator&lowbar;traits&lt;allocator&lt;char&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-093.adoc[`allocator&lowbar;traits&lt;allocator&lt;char16&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-00c.adoc[`allocator&lowbar;traits&lt;allocator&lt;char32&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0a6.adoc[`allocator&lowbar;traits&lt;allocator&lt;char8&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-083.adoc[`allocator&lowbar;traits&lt;allocator&lt;double&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-064.adoc[`allocator&lowbar;traits&lt;allocator&lt;float&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0fe.adoc[`allocator&lowbar;traits&lt;allocator&lt;int&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-009.adoc[`allocator&lowbar;traits&lt;allocator&lt;long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0b9.adoc[`allocator&lowbar;traits&lt;allocator&lt;long double&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-08d.adoc[`allocator&lowbar;traits&lt;allocator&lt;long long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0a5.adoc[`allocator&lowbar;traits&lt;allocator&lt;short&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-04f.adoc[`allocator&lowbar;traits&lt;allocator&lt;signed char&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-071.adoc[`allocator&lowbar;traits&lt;allocator&lt;unsigned char&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-082.adoc[`allocator&lowbar;traits&lt;allocator&lt;unsigned int&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0fb.adoc[`allocator&lowbar;traits&lt;allocator&lt;unsigned long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-02.adoc[`allocator&lowbar;traits&lt;allocator&lt;unsigned long long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-03.adoc[`allocator&lowbar;traits&lt;allocator&lt;unsigned short&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0c0.adoc[`allocator&lowbar;traits&lt;allocator&lt;wchar&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-003.adoc[`allocator&lowbar;traits&lt;allocator&lt;pair&lt;Date, DayOfWeekSet&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0fd.adoc[`allocator&lowbar;traits&lt;allocator&lt;pair&lt;TimeInterval const, Node*&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-060.adoc[`allocator&lowbar;traits&lt;allocator&lt;pair&lt;int const, pair&lt;shared&lowbar;ptr&lt;Statistics&gt;, shared&lowbar;ptr&lt;Collector&lt;OsLinux&gt;&gt;&gt;&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0a0.adoc[`allocator&lowbar;traits&lt;allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-017.adoc[`allocator&lowbar;traits&lt;allocator&lt;void*&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0e1.adoc[`allocator&lowbar;traits&lt;allocator&lt;char const*&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0d0.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;Attribute&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-00f.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;BslAllocator&lowbar;Voidish&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0ea.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;Json&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0e8.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;ManagedAttribute&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-098.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;MetricSampleGroup&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-065.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;UserFieldValue&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-018.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;ZoneinfoTransition&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0003.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;bool&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-01b.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;char&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0c4.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;char16&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-074.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;char32&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-07f.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;char8&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-078.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;double&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-092.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;float&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-090.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;int&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-068.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-08a.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;long double&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-054.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;long long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-04b.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;short&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0001.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;signed char&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0b1.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;unsigned char&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-04a.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;unsigned int&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-01a8.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;unsigned long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-05b.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;unsigned long long&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-09b.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;unsigned short&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-01a4.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;wchar&lowbar;t&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0d4.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;pair&lt;Date, DayOfWeekSet&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-08c.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;pair&lt;TimeInterval const, Node*&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0e4c.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;pair&lt;int const, pair&lt;shared&lowbar;ptr&lt;Statistics&gt;, shared&lowbar;ptr&lt;Collector&lt;OsLinux&gt;&gt;&gt;&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0e43.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-086.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;void*&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0f21.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;char const*&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-05e.adoc[`allocator&lowbar;traits&lt;allocator&lt;TYPE&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0ae.adoc[`allocator&lowbar;traits&lt;std::allocator&lt;ALLOCATOR&lowbar;TYPE&gt;&gt;`] 
| 
| xref:bsl/allocator_traits-059.adoc[`allocator&lowbar;traits&lt;polymorphic&lowbar;allocator&lt;TYPE&gt;&gt;`] 
| This `struct` template provides a specialization of the `allocator&lowbar;traits` class template for `bsl&colon;&colon;polymorphic&lowbar;allocator`&period; This specialization is not strictly necessary, but its presence speeds up compilation by bypassing a significant amount of metaprogramming&period;
| xref:bsl/allocator_traits-0a4.adoc[`allocator&lowbar;traits&lt;ALLOCATOR&lowbar;TYPE*&gt;`] 
| TBD&colon; improve comment This is an empty class specialization of `allocator&lowbar;traits` for pointer types that (intentionally) does not define any of the traits typedefs&period; It&apos;s needed in order make unambiguous function overloads that take both a standard allocator by value and a `bslma&colon;&colon;Allocator &ast;`&period; By using the typedefs defined in `allocator&lowbar;traits` in the signature of functions taking standard allocators, we can ensure that those overloads are not considered when using `bslma`&hyphen;style allocators&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/AllocatorUtil_Traits-0f.adoc[`AllocatorUtil&lowbar;Traits&lt;t&lowbar;MEMORY&lowbar;RSRC*, t&lowbar;TYPE&gt;`] 
| This specialization is for allocators expressed as a pointer to class derived from `bsl&colon;&colon;memory&lowbar;resource`&period; The base class will be `bsl&colon;&colon;allocator&lowbar;traits&lt;bsl&colon;&colon;allocator&lt;t&lowbar;TYPE&gt;&gt;` if `t&lowbar;MEMORY&lowbar;RSRC` is derived from `bsl&colon;&colon;Allocator`&semi; otherwise the base class will be `bsl&colon;&colon;allocator&lowbar;traits&lt;bsl&colon;&colon;polymorphic&lowbar;allocator&lt;t&lowbar;TYPE&gt;&gt;`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
