Constructors
Declared in <bslstl_variant.h>
Create a Variant_Base object holding the 0th alternative, which is value-initialized. If this Variant_Base is allocator-aware, the currently installed default allocator is used to supply memory.
Variant_Base();
» more...
Create a Variant_Base object holding the same alternative (if any) as the specified original object. If this Variant_Base is allocator-aware, the currently installed default allocator is used to supply memory. If the original object is not valueless by exception', the contained value is copy-constructed from the contained value of original. All alternatives shall be copy constructible.
Variant_Base(Variant_Base const& original);
» more...
Create a Variant_Base object holding the same alternative (if any) held by the specified original. If this Variant_Base is allocator-aware, the allocator of original is used to supply memory. If the original object is not valueless by exception, the contained value is move-constructed from the contained value of original. All alternatives shall be move constructible.
Variant_Base(Variant_Base&& original);
» more...
Create a Variant_Base object whose index is the specified index without constructing an alternative object. If this Variant_Base is allocator-aware, the default allocator is used to supply memory.
Variant_Base(
Variant_ConstructFromStdTag,
size_t index);
» more...
Create a Variant_Base object holding the 0th alternative, which is value-initialized. If this Variant_Base is allocator-aware, the specified allocator is used to supply memory.
Variant_Base(
std::allocator_arg_t,
allocator_type allocator);
» more...
Create a Variant_Base object holding the alternative with index (template parameter) t_INDEX, direct-initialized from the specified args. If this Variant_Base is allocator-aware, the currently installed default allocator is used to supply memory.
template<
size_t t_INDEX,
class... t_ARGS>
explicit
Variant_Base(
bsl::in_place_index_t<t_INDEX>,
t_ARGS&&... args);
» more...
Create a Variant_Base object holding the same alternative (if any) held by the specified original object. If this Variant_Base is allocator-aware, the specified allocator is used to supply memory. If the original object is not valueless by exception, the contained value is copy/move constructed from the contained value of original. All alternatives shall be copy/move constructible.
Variant_Base(
std::allocator_arg_t,
allocator_type allocator,
Variant const& original);
» more...
See the corresponding copy constructor above.
Variant_Base(
std::allocator_arg_t,
allocator_type allocator,
Variant&& original);
» more...
Create a Variant_Base object whose index is the specified index without constructing an alternative object. If this Variant_Base is allocator-aware, the specified allocator is used to supply memory.
Variant_Base(
std::allocator_arg_t,
allocator_type allocator,
Variant_ConstructFromStdTag,
size_t index);
» more...
Create a Variant_Base object holding the alternative with index (template parameter) t_INDEX, direct-initialized from the specified args. If this Variant_Base is allocator-aware, the specified allocator is used to supply memory.
template<
size_t t_INDEX,
class... t_ARGS>
explicit
Variant_Base(
std::allocator_arg_t,
allocator_type allocator,
bsl::in_place_index_t<t_INDEX>,
t_ARGS&&... args);
» more...