[#bsl-variant-get_allocator] = xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::get_allocator :relfileprefix: ../../ :mrdocs: Return a copy of this object's allocator. At least one alternative of this `variant` object shall be allocator‐aware; in C++03, due to language limitations, this method can be called even if no alternative is allocator‐aware, but returns a non‐allocator type in that case. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<bool t_USES_BSLMA_ALLOC = BloombergLP::bslstl::Variant_UsesBslmaAllocatorAny<t_HEAD, t_TAIL...>::value> requires t_USES_BSLMA_ALLOC xref:bsl/variant/allocator_type.adoc[allocator_type] get_allocator() const noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#