[#bsl-allocator_traits-05e] = xref:bsl.adoc[bsl]::xref:bsl/allocator_traits-0108.adoc[allocator_traits]<xref:bsl/allocator-0df.adoc[allocator<TYPE>]> :relfileprefix: ../ :mrdocs: Specialization of `allocator_traits` for `bsl::allocator`. == Synopsis Declared in `<bslma_bslallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> struct xref:bsl/allocator_traits-0108.adoc[allocator_traits]<xref:bsl/allocator-0df.adoc[allocator<TYPE>]>; ---- == Description This `struct` template provides a specialization of the `allocator_traits` class template for `bsl::allocator`. This specialization is not strictly necessary, but its presence speeds up compliation by bypassing a significant amount of metaprogramming. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/allocator_traits-05e/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias to `allocator<TYPE>`. | xref:bsl/allocator_traits-05e/const_pointer.adoc[`const_pointer`] | This `typedef` is an alias to `allocator_type::const_pointer`. | xref:bsl/allocator_traits-05e/const_void_pointer.adoc[`const_void_pointer`] | This `typedef` is an alias to `allocator_type::const_void_pointer`. | xref:bsl/allocator_traits-05e/difference_type.adoc[`difference_type`] | This `typedef` is an alias to `allocator_type::difference_type`. | xref:bsl/allocator_traits-05e/is_always_equal.adoc[`is_always_equal`] | `false_type`; `bsl::allocator` instances are not always equal. | xref:bsl/allocator_traits-05e/pointer.adoc[`pointer`] | This `typedef` is an alias to `allocator_type::pointer`. | xref:bsl/allocator_traits-05e/propagate_on_container_copy_assignment.adoc[`propagate_on_container_copy_assignment`] | `false_type`; do not propagate the allocator on copy assignment. | xref:bsl/allocator_traits-05e/propagate_on_container_move_assignment.adoc[`propagate_on_container_move_assignment`] | `false_type`; do not propagate the allocator on move assignment. | xref:bsl/allocator_traits-05e/propagate_on_container_swap.adoc[`propagate_on_container_swap`] | `false_type`; do not propagate the allocator on swap. | xref:bsl/allocator_traits-05e/rebind_alloc.adoc[`rebind_alloc`] | Rebind this allocator to the specified `ELEMENT_TYPE`. | xref:bsl/allocator_traits-05e/rebind_traits.adoc[`rebind_traits`] | Rebind this allocator traits type to the specified `ELEMENT_TYPE`. | xref:bsl/allocator_traits-05e/size_type.adoc[`size_type`] | This `typedef` is an alias to `allocator_type::size_type`. | xref:bsl/allocator_traits-05e/value_type.adoc[`value_type`] | This `typedef` is an alias to the (template parameter) `TYPE`. | xref:bsl/allocator_traits-05e/void_pointer.adoc[`void_pointer`] | This `typedef` is an alias to `allocator_type::void_pointer`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/allocator_traits-05e/allocate-04.adoc[`allocate`] | `allocate` overloads | xref:bsl/allocator_traits-05e/construct-02.adoc[`construct`] | `construct` overloads | xref:bsl/allocator_traits-05e/deallocate.adoc[`deallocate`] | Deallocate the memory at `p` previously allocated from `m`. | xref:bsl/allocator_traits-05e/destroy.adoc[`destroy`] | Destroy the object at the specified `p`. | xref:bsl/allocator_traits-05e/max_size.adoc[`max_size`] | Return the maximum number of elements allocatable by `m`. | xref:bsl/allocator_traits-05e/select_on_container_copy_construction.adoc[`select_on_container_copy_construction`] | Return a default‐constructed allocator for container copy construction. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#