BloombergLP::bdlb::Variant8::assign

assign overloads

Synopses

Declared in <bdlb_variant.h>

Assign to this object the specified value of template parameter TYPE, and return a reference providing modifiable access to this object. The value currently held by this variant (if any) is destroyed if that value's type is not the same as TYPE. TYPE must be the same as one of the types that this variant can hold.

template<class TYPE>
VariantImp<TYPES>&
assign(TYPE const& value);
» more...

Assign to this object the specified value of template parameter TYPE, and return a reference providing modifiable access to this object. The contents of value are moved to this object with value left in a valid but unspecified state. The value currently held by this variant (if any) is destroyed if that value`s type is not the same as TYPE. TYPE must be the same as one of the types that this variant can hold.

template<class TYPE>
VariantImp<TYPES>&
assign(TYPE&& value);
» more...