[#BloombergLP-bslma-AllocatorUtil_Traits-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::AllocatorUtil_Traits :relfileprefix: ../../ :mrdocs: Extend the notion of `allocator_traits` to apply to both standard allocator and to pointer‐to‐memory‐resource types. If the (template parameter) `t_ALLOCATOR` is a non‐pointer type (i.e., an allocator class), then inherits from `bsl::allocator_traits<t_ALLOCATOR>::rebind_traits<t_TYPE>`. However, if `t_ALLOCATOR` is a pointer type, then inherits from `bsl::allocator_traits<bsl::allocator<t_TYPE>>` for pointers to classes derived from `bslma::Allocator` and from `bsl::allocator_traits<bsl::polymorphic_allocator<t_TYPE>>` for pointers to other classes derived from `bsl::memory_resource`. This primary template is for non‐pointer `t_ALLOCATOR` template arguments. == Synopsis Declared in `<bslma_allocatorutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_ALLOCATOR, class t_TYPE = char> struct AllocatorUtil_Traits : bsl::allocator_traits<t_ALLOCATOR>::rebind_traits<t_TYPE> ---- == Base Classes [cols="1,4"] |=== | Name| Description | `bsl::allocator_traits<t_ALLOCATOR>::rebind_traits<t_TYPE>` | |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/AllocatorUtil_Traits-0f.adoc[`AllocatorUtil_Traits<t_MEMORY_RSRC*, t_TYPE>`] | This specialization is for allocators expressed as a pointer to class derived from `bsl::memory_resource`. The base class will be `bsl::allocator_traits<bsl::allocator<t_TYPE>>` if `t_MEMORY_RSRC` is derived from `bsl::Allocator`; otherwise the base class will be `bsl::allocator_traits<bsl::polymorphic_allocator<t_TYPE>>`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#