[#BloombergLP-bslma-AAModelIsSupported-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::AAModelIsSupported :relfileprefix: ../../ :mrdocs: Predicate metafunction that determines if the specified `TYPE` supports the specified `MODEL` AA model. It yields (i.e., is derived from) `bsl:true_type` if type `TYPE` supports AA model `MODEL`; otherwise it yields `false_type`. `MODEL` Must be one of `AAModelNone`, `AAModelLegacy`, `AAModelBsl`, `AAModelPmr`, or `AAModelStl`. This metafunction can yield `true_type` for more than one type `MODEL` type, e.g., it will yield `true_type` if `TYPE` is *bsl‐AA*, and `MODEL` is either `AAModelBsl` or `AAModelLegacy`, since `TYPE` can be constructed with either allocator type. == Synopsis Declared in `<bslma_aamodel.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class MODEL> struct AAModelIsSupported : 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/AAModelIsSupported-01a.adoc[`AAModelIsSupported<TYPE, AAModelBsl>`] | Specialization of `AAModelIsSupported` for `MODEL == AAModelBsl`, yielding `true_type` if `TYPE::allocator_type` exists and is convertible from `bsl::allocator<char>`. | xref:BloombergLP/bslma/AAModelIsSupported-00.adoc[`AAModelIsSupported<TYPE, AAModelLegacy>`] | Specialization of `AAModelIsSupported` for `MODEL == AAModelStl`, yielding `true_type` if `TYPE` can use `bslma::Allocator *` as its memory resource. Specifically, it is true if `UsesBslmaAllocator<TYPE>` is true or if `TYPE::allocator_type` exists and is convertible from `bslma::Allocator *`. | xref:BloombergLP/bslma/AAModelIsSupported-04.adoc[`AAModelIsSupported<TYPE, AAModelNone>`] | Specialization of `AAModelIsSupported` for `MODEL == AAModelNone`, always yielding `true_type`. | xref:BloombergLP/bslma/AAModelIsSupported-0c.adoc[`AAModelIsSupported<TYPE, AAModelPmr>`] | Specialization of `AAModelIsSupported` for `MODEL == AAModelPmr`, yielding `true_type` if `TYPE::allocator_type` exists and is convertible from `bsl::polymorphic_allocator<char>`. | xref:BloombergLP/bslma/AAModelIsSupported-01d.adoc[`AAModelIsSupported<TYPE, AAModelStl>`] | Specialization of `AAModelIsSupported` for `MODEL == AAModelStl`, yielding `true_type` if `TYPE::allocator_type` exists; otherwise, yielding `false_type` unless `AAModelIsSupported<TYPE, AAModelBsl>` is true. The latter condition exists so that *bsl‐AA* always implies *stl‐AA* even if `AAModelIsSupported<TYPE, AAModelBsl>` is explicitly specialized to true for a type that does not have an `allocator_type` member. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#