[#BloombergLP-bslma-HasAllocatorType-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::HasAllocatorType
:relfileprefix: ../../
:mrdocs:

This metafunction yields `bsl&colon;&colon;true&lowbar;type` if the specified template&hyphen;parameter `TYPE` has a nested type named `allocator&lowbar;type` that meets the requirements for a C&plus;&plus;11 allocator, and `bsl&colon;&colon;false&lowbar;type` otherwise&period; This primary template, yielding `false&lowbar;type`, is instantiated for types for which `allocator&lowbar;type` does not exist or is not an allocator type&period; Note that instantiation will fail if `allocator&lowbar;type` exists but is not public within `TYPE` or if any of the required members of `TYPE&colon;&colon;allocator&lowbar;type` exist but are not public (though only `value&lowbar;type` and `allocate` are tested at present)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TYPE,
    class = void&gt;
struct HasAllocatorType
    : xref:bsl/false_type.adoc[bsl::false&lowbar;type]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/false_type.adoc[bsl::false&lowbar;type]`
| Metafunction representing the boolean constant `false`&period;
|===

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/HasAllocatorType-0f.adoc[`HasAllocatorType&lt;TYPE, bsl::void&lowbar;t&lt;TYPE::allocator&lowbar;type&gt;&gt;`] 
| Partial specialization of `HasAllocatorType` yielding `true&lowbar;type` is instantiated for `TYPE`s that _do_ have an `allocator&lowbar;type` member that meets the requirements of a C&plus;&plus;11 allocator type&period;
|===



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