Create a variant object holding a value‐initialized 0th alternative using allocator.
Synopsis
Declared in <bslstl_variant.h>
template<class t_FIRST = t_HEAD>
requires std::is_default_constructible<t_FIRST>::value
variant(
std::allocator_arg_t allocatorArg,
allocator_type allocator);
Description
Create a variant object holding the 0th alternative, which is value‐initialized. If this variant is allocator‐aware, the specified allocator is used to supply memory. This constructor participates in overload resolution only if the 0th alternative is default constructible.
Parameters
Name |
Description |
allocatorArg |
tag selecting the allocator‐extended overload |
allocator |
allocator used to supply memory |
Created with MrDocs