[#BloombergLP-bslma-IsStdAllocator-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::IsStdAllocator
:relfileprefix: ../../
:mrdocs:

Metafunction that yields whether `TYPE` meets C&plus;&plus;11 allocator requirements&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
struct IsStdAllocator
    : &sol;&ast; implementation-defined &ast;&sol;::type
----

== Description

Metafunction to determine whether the specified template parameter `TYPE` meets the minimum requirements for a C&plus;&plus;11 allocator&period; Specifically, this `struct` is derived from `true&lowbar;type` if `TYPE` has a nested `value&lowbar;type` and supports the operation `a&period;allocate(bytes)`, where `a` has type `TYPE` and `bytes` has type `allocator&lowbar;traits&lt;TYPE&gt;&colon;&colon;size&lowbar;type`&semi; otherwise it is derived from `false&lowbar;type`&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `&sol;&ast; implementation-defined &ast;&sol;::type`
| 
|===

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/IsStdAllocator-06f.adoc[`IsStdAllocator&lt;bsl::allocator&lt;void&gt;&gt;`] 
| `bsl&colon;&colon;allocator&lt;void&gt;` is not an allocator type, even though all other instantiations are allocator types&period;
| xref:BloombergLP/bslma/IsStdAllocator-01.adoc[`IsStdAllocator&lt;std::allocator&lt;void&gt;&gt;`] 
| `std&colon;&colon;allocator&lt;void&gt;` is not an allocator type, even though all other specializations are allocator types&period;
| xref:BloombergLP/bslma/IsStdAllocator-0f68.adoc[`IsStdAllocator&lt;bsl::allocator&lt;TYPE&gt;&gt;`] 
| A `bsl&colon;&colon;allocator` inherits its `allocate` method from a base class, which causes `IsStdAllocator` to fail the auto&hyphen;detected it&period;
| xref:BloombergLP/bslma/IsStdAllocator-065.adoc[`IsStdAllocator&lt;std::allocator&lt;TYPE&gt;&gt;`] 
| Specialization for `std&colon;&colon;allocator`&period;
| xref:BloombergLP/bslma/IsStdAllocator-0f6d.adoc[`IsStdAllocator&lt;bsl::polymorphic&lowbar;allocator&lt;TYPE&gt;&gt;`] 
| Declare `polymorphic&lowbar;allocator` as a C&plus;&plus;11 compatible allocator for all versions of C&plus;&plus;&period;
| xref:BloombergLP/bslma/IsStdAllocator-0a.adoc[`IsStdAllocator&lt;TYPE&&gt;`] 
| Specialization for lvalue reference types&period;
| xref:BloombergLP/bslma/IsStdAllocator-0b.adoc[`IsStdAllocator&lt;TYPE&&&gt;`] 
| Specialization for rvalue reference types&period;
|===



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