[#BloombergLP-bdlb-Variant2-operator_assign-0e1] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Variant2.adoc[Variant2]::operator= :relfileprefix: ../../../ :mrdocs: Assign the specified `TYPE` `value` to this object. == Synopsis Declared in `<bdlb_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> xref:BloombergLP/bdlb/Variant2.adoc[Variant2<A1, A2>]& operator=(TYPE const& value); ---- == Description 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. == Return Value reference providing modifiable access to this object == Parameters [cols="1,4"] |=== | Name| Description | *value* | value assigned to or stored in this variant |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#