[#BloombergLP-bslstl-Variant_Base-operator_assign-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_Base.adoc[Variant&lowbar;Base]::operator&equals;
:relfileprefix: ../../../
:mrdocs:

Assignment operators

== Synopses

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

If the specified `rhs` holds the same alternative type as this object, copy assign the contained value of `rhs` to the contained value of this object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/Variant_Base.adoc[Variant&lowbar;Base&lt;t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;&gt;]&
xref:BloombergLP/bslstl/Variant_Base/operator_assign-02.adoc[operator&equals;](xref:BloombergLP/bslstl/Variant_Base.adoc[Variant&lowbar;Base] const& rhs);
----

[.small]#xref:BloombergLP/bslstl/Variant_Base/operator_assign-02.adoc[_» more&period;&period;&period;_]#

If the specified `rhs` holds the same alternative type as this object, move assign the contained value of `rhs` to the contained value of this object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/Variant_Base.adoc[Variant&lowbar;Base&lt;t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;&gt;]&
xref:BloombergLP/bslstl/Variant_Base/operator_assign-0a.adoc[operator&equals;](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;Variant&lowbar;Base&gt;] rhs);
----

[.small]#xref:BloombergLP/bslstl/Variant_Base/operator_assign-0a.adoc[_» more&period;&period;&period;_]#

== Return Value

reference to this object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rhs*
| object to assign from
|===


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