bsl::variant::get_allocator

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>

template<bool t_USES_BSLMA_ALLOC = BloombergLP::bslstl::Variant_UsesBslmaAllocatorAny<t_HEAD, t_TAIL...>::value>
requires t_USES_BSLMA_ALLOC
allocator_type
get_allocator() const noexcept;