bsl::variant::operator=

Assignment operators

Synopses

Declared in <bslstl_variant.h>

Assign to this object a copy of rhs's alternative.

variant&
operator=(variant const& rhs) = default;
» more...

Assign to this object a moved copy of rhs's alternative.

variant&
operator=(variant&& rhs) = default;
» more...

Assign to this object the specified value.

template<class t_TYPE>
variant&
operator=(t_TYPE&& value)
requires BloombergLP::bslstl::Variant_AssignsFromType<variant, t_TYPE>::value;
» more...

Return Value

reference to this object

Parameters

NameDescription
rhsvariant to copy from
valuevalue to assign to the selected alternative