BloombergLP::bslstl::Variant_Base::Variant_Base

Constructors

Synopses

Declared in <bslstl_variant.h>

Create a Variant_Base object holding the 0th alternative, which is value-initialized.

Variant_Base();
» more...

Create a Variant_Base object holding the same alternative (if any) as the specified original object.

Variant_Base(Variant_Base const& original);
» more...

Create a Variant_Base object holding the same alternative (if any) held by the specified original.

Variant_Base(Variant_Base&& original);
» more...

Create a Variant_Base object whose index is the specified index without constructing an alternative object.

Variant_Base(
    Variant_ConstructFromStdTag fromStdTag,
    size_t index);
» more...

Create a Variant_Base object holding the 0th alternative, which is value-initialized.

Variant_Base(
    std::allocator_arg_t allocatorArg,
    allocator_type allocator);
» more...

Create a Variant_Base object holding the alternative with index (template parameter) t_INDEX, direct-initialized from the specified args.

template<
    size_t t_INDEX,
    class... t_ARGS>
explicit
Variant_Base(
    bsl::in_place_index_t<t_INDEX> inPlaceIndex,
    t_ARGS&&... args);
» more...

Create a Variant_Base object holding the same alternative (if any) held by the specified original object.

Variant_Base(
    std::allocator_arg_t allocatorArg,
    allocator_type allocator,
    Variant const& original);
» more...

See the corresponding copy constructor above.

Variant_Base(
    std::allocator_arg_t allocatorArg,
    allocator_type allocator,
    Variant&& original);
» more...

Create a Variant_Base object whose index is the specified index without constructing an alternative object.

Variant_Base(
    std::allocator_arg_t allocatorArg,
    allocator_type allocator,
    Variant_ConstructFromStdTag fromStdTag,
    size_t index);
» more...

Create a Variant_Base object holding the alternative with index (template parameter) t_INDEX, direct-initialized from the specified args.

template<
    size_t t_INDEX,
    class... t_ARGS>
explicit
Variant_Base(
    std::allocator_arg_t allocatorArg,
    allocator_type allocator,
    bsl::in_place_index_t<t_INDEX> inPlaceIndex,
    t_ARGS&&... args);
» more...

Parameters

NameDescription
originalobject to copy
fromStdTagtag selecting this indexless construction overload
indexindex of the alternative that will (later) be created
allocatorArgtag selecting the allocator-extended overload
allocatorallocator used to supply memory
inPlaceIndextag selecting the in-place-index constructor
argsarguments forwarded to the alternative's constructor