[#BloombergLP-bdlb-Variant2-operator_assign-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Variant2.adoc[Variant2]::operator= :relfileprefix: ../../../ :mrdocs: Assign to this object the type and value currently held by the specified `rhs` object, 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 the type held by the `rhs` object. == Synopsis Declared in `<bdlb_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlb/Variant2.adoc[Variant2<A1, A2>]& operator=(xref:BloombergLP/bdlb/Variant2.adoc[Variant2] const& rhs); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#