Create a variant object holding a moved copy of original's alternative using allocator.
Synopsis
Declared in <bslstl_variant.h>
template<class t_FIRST = t_HEAD>
requires BloombergLP::bslstl::
Variant_IsMoveConstructibleAll<t_FIRST, t_TAIL...>::value
variant(
std::allocator_arg_t allocatorArg,
allocator_type allocator,
variant&& original);
Description
Create a variant object holding the same alternative (if any) held by the specified original. If this variant is allocator‐aware, the specified allocator is used to supply memory. If original is not valueless by exception, the contained value is move‐constructed from the contained value of original. This constructor participates in overload resolution only if all alternatives are move constructible.
Parameters
Name |
Description |
allocatorArg |
tag selecting the allocator‐extended overload |
allocator |
allocator used to supply memory |
original |
variant to move from |
Created with MrDocs