[#BloombergLP-bdlb-Variant2-operator_assign-0e1]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Variant2.adoc[Variant2]::operator&equals;
:relfileprefix: ../../../
:mrdocs:

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

== Synopsis

Declared in `&lt;bdlb&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
xref:BloombergLP/bdlb/Variant2.adoc[Variant2&lt;A1, A2&gt;]&
operator&equals;(TYPE const& value);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
