[#BloombergLP-bslstl-Variant_AllocatorBase-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant&lowbar;AllocatorBase
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private struct keeps track of the allocator for a `bsl&colon;&colon;variant` object&period; The primary template is used when the `variant` is not allocator&hyphen;aware (because it has no allocator&hyphen;aware alternatives)&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;bool t&lowbar;AA&gt;
struct Variant&lowbar;AllocatorBase;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Variant_AllocatorBase-0e/mechanism.adoc[`mechanism`] 
| Return a null pointer&period; Note that this method has the same return type as the allocator&hyphen;aware version so that the remainder of the implementation of `bsl&colon;&colon;variant` is abstracted with respect to whether or not the specialization is allocator&hyphen;aware&semi; this is why both methods return `bslma&colon;&colon;Allocator&ast;` instead of `bsl&colon;&colon;allocator&lt;char&gt;`&period; The returned pointer will be ignored (and not dereferenced) when passed to `bslma&colon;&colon;ConstructionUtil&colon;&colon;construct`&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Variant_AllocatorBase-04.adoc[`Variant&lowbar;AllocatorBase&lt;true&gt;`] 
| This specialization is used when the `variant` is allocator&hyphen;aware&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Variant_Base.adoc[`Variant&lowbar;Base`] 
| This component&hyphen;private struct defines the data representation of `bsl&colon;&colon;variant` and contains the implementations of its special member functions (which must be defaulted in `bsl&colon;&colon;variant` itself)&period; This class also contains implementations of additional constructors and methods needed for the correct functionality of the `variant` class hierarchy&period;
|===


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