[#bsl-deque-0c-operator_assign-05f]
= xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::operator&equals;
:relfileprefix: ../../
:mrdocs:

Assignment operators

== Synopses

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

Assign to this object the value of the specified `rhs` object, propagate to this object the allocator of `rhs` if the `ALLOCATOR` type has trait `propagate&lowbar;on&lowbar;container&lowbar;copy&lowbar;assignment`, and return a reference providing modifiable access to this object&period; If an exception is thrown, `&ast;this` is left in a valid but unspecified state&period; This method requires that the (template parameter) `VALUE&lowbar;TYPE` be `copy&hyphen;assignable` and `copy&hyphen;insertable` into this deque (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;]&
xref:bsl/deque-0c/operator_assign-059.adoc[operator&equals;](xref:bsl/deque-0c.adoc[deque] const& rhs);
----

[.small]#xref:bsl/deque-0c/operator_assign-059.adoc[_» more&period;&period;&period;_]#

Assign to this object the value of the specified `rhs` object, propagate to this object the allocator of `rhs` if the `ALLOCATOR` type has trait `propagate&lowbar;on&lowbar;container&lowbar;move&lowbar;assignment`, and return a reference providing modifiable access to this object&period; The contents of `rhs` are moved (in constant time) to this deque if `get&lowbar;allocator() &equals;&equals; rhs&period;get&lowbar;allocator()` (after accounting for the aforementioned trait)&semi; otherwise, all elements in this deque are either destroyed or move&hyphen;assigned to and each additional element in `rhs` is move&hyphen;inserted into this deque&period; `rhs` is left in a valid but unspecified state, and if an exception is thrown, `&ast;this` is left in a valid but unspecified state&period; This method requires that the (template parameter) `VALUE&lowbar;TYPE` be `move&hyphen;assignable` and `move&hyphen;insertable` into this deque (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;]&
xref:bsl/deque-0c/operator_assign-06.adoc[operator&equals;](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;deque&gt;] rhs) noexcept(AllocatorTraits&colon;&colon;is&lowbar;always&lowbar;equal&colon;&colon;value);
----

[.small]#xref:bsl/deque-0c/operator_assign-06.adoc[_» more&period;&period;&period;_]#

Assign to this object the value resulting from first clearing this deque and then appending each `value&lowbar;type` object in the specified `values` initializer list&semi; return a reference providing modifiable access to this object&period; This method requires that the (template parameter) `VALUE&lowbar;TYPE` be `copy&hyphen;insertable` into this deque (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;]&
xref:bsl/deque-0c/operator_assign-0d.adoc[operator&equals;](std::initializer&lowbar;list&lt;value&lowbar;type&gt; values);
----

[.small]#xref:bsl/deque-0c/operator_assign-0d.adoc[_» more&period;&period;&period;_]#


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