[#BloombergLP-bslstl-Variant_AllocatorBase-0e] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant_AllocatorBase :relfileprefix: ../../ :mrdocs: This component‐private struct keeps track of the allocator for a `bsl::variant` object. The primary template is used when the `variant` is not allocator‐aware (because it has no allocator‐aware alternatives). == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<bool t_AA> struct Variant_AllocatorBase; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_AllocatorBase-0e/mechanism.adoc[`mechanism`] | Return a null pointer. Note that this method has the same return type as the allocator‐aware version so that the remainder of the implementation of `bsl::variant` is abstracted with respect to whether or not the specialization is allocator‐aware; this is why both methods return `bslma::Allocator*` instead of `bsl::allocator<char>`. The returned pointer will be ignored (and not dereferenced) when passed to `bslma::ConstructionUtil::construct`. |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_AllocatorBase-04.adoc[`Variant_AllocatorBase<true>`] | This specialization is used when the `variant` is allocator‐aware. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_Base.adoc[`Variant_Base`] | This component‐private struct defines the data representation of `bsl::variant` and contains the implementations of its special member functions (which must be defaulted in `bsl::variant` itself). This class also contains implementations of additional constructors and methods needed for the correct functionality of the `variant` class hierarchy. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#