[#BloombergLP-bslma-IsStdAllocator-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::IsStdAllocator :relfileprefix: ../../ :mrdocs: Metafunction to determine whether the specified template parameter `TYPE` meets the minimum requirements for a C++11 allocator. Specifically, this `struct` is derived from `true_type` if `TYPE` has a nested `value_type` and supports the operation `a.allocate(bytes)`, where `a` has type `TYPE` and `bytes` has type `allocator_traits<TYPE>::size_type`; otherwise it is derived from `false_type`. == Synopsis Declared in `<bslma_isstdallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> struct IsStdAllocator : /* implementation-defined */::type ---- == Base Classes [cols="1,4"] |=== | Name| Description | `/* implementation-defined */::type` | |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/IsStdAllocator-06f.adoc[`IsStdAllocator<bsl::allocator<void>>`] | `bsl::allocator<void>` is not an allocator type, even though all other instantiations are allocator types. | xref:BloombergLP/bslma/IsStdAllocator-01.adoc[`IsStdAllocator<std::allocator<void>>`] | `std::allocator<void>` is not an allocator type, even though all other specializations are allocator types. | xref:BloombergLP/bslma/IsStdAllocator-0f68.adoc[`IsStdAllocator<bsl::allocator<TYPE>>`] | A `bsl::allocator` inherits its `allocate` method from a base class, which causes `IsStdAllocator` to fail the auto‐detected it. | xref:BloombergLP/bslma/IsStdAllocator-065.adoc[`IsStdAllocator<std::allocator<TYPE>>`] | Specialization for `std::allocator`. | xref:BloombergLP/bslma/IsStdAllocator-0f6d.adoc[`IsStdAllocator<bsl::polymorphic_allocator<TYPE>>`] | Declare `polymorphic_allocator` as a C++11 compatible allocator for all versions of C++. | xref:BloombergLP/bslma/IsStdAllocator-0a.adoc[`IsStdAllocator<TYPE&>`] | Specialization for lvalue reference types. | xref:BloombergLP/bslma/IsStdAllocator-0b.adoc[`IsStdAllocator<TYPE&&>`] | Specialization for rvalue reference types. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#