[#BloombergLP-bslma-HasAllocatorType-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::HasAllocatorType :relfileprefix: ../../ :mrdocs: This metafunction yields `bsl::true_type` if the specified template‐parameter `TYPE` has a nested type named `allocator_type` that meets the requirements for a C++11 allocator, and `bsl::false_type` otherwise. This primary template, yielding `false_type`, is instantiated for types for which `allocator_type` does not exist or is not an allocator type. Note that instantiation will fail if `allocator_type` exists but is not public within `TYPE` or if any of the required members of `TYPE::allocator_type` exist but are not public (though only `value_type` and `allocate` are tested at present). == Synopsis Declared in `<bslma_hasallocatortype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class = void> struct HasAllocatorType : xref:bsl/false_type.adoc[bsl::false_type] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:bsl/false_type.adoc[bsl::false_type]` | Metafunction representing the boolean constant `false`. |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/HasAllocatorType-0f.adoc[`HasAllocatorType<TYPE, bsl::void_t<TYPE::allocator_type>>`] | Partial specialization of `HasAllocatorType` yielding `true_type` is instantiated for `TYPE`s that _do_ have an `allocator_type` member that meets the requirements of a C++11 allocator type. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#