[#BloombergLP-bslstl-Optional_Base-05-operator_assign-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional&lowbar;Base]::operator&equals;
:relfileprefix: ../../../
:mrdocs:

Assignment operators

== Synopses

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

Assign to this object the value of the specified `rhs` object, and return a non&hyphen;`const` reference to this object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional&lowbar;Base&lt;t&lowbar;TYPE, t&lowbar;USES&lowbar;BSLMA&lowbar;ALLOC&gt;]&
xref:BloombergLP/bslstl/Optional_Base-05/operator_assign-05.adoc[operator&equals;](xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional&lowbar;Base] const& rhs);
----

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

Assign to this object the value of the specified `rhs` object, and return a non&hyphen;`const` reference to this object&period; The allocators of this object and `rhs` both remain unchanged&period; The contents of `rhs` are either move&hyphen;constructed into or move&hyphen;assigned to this object&period; `rhs` is left in a valid but unspecified state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional&lowbar;Base&lt;t&lowbar;TYPE, t&lowbar;USES&lowbar;BSLMA&lowbar;ALLOC&gt;]&
xref:BloombergLP/bslstl/Optional_Base-05/operator_assign-08.adoc[operator&equals;](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;Optional&lowbar;Base&gt;] rhs);
----

[.small]#xref:BloombergLP/bslstl/Optional_Base-05/operator_assign-08.adoc[_» more&period;&period;&period;_]#


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