[#bsl-deque-0c-assign-0e]
= xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::assign
:relfileprefix: ../../
:mrdocs:

`assign` overloads

== Synopses

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

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&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"]
----
void
xref:bsl/deque-0c/assign-0d.adoc[assign](std::initializer&lowbar;list&lt;value&lowbar;type&gt; values);
----

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

Assign to this object the value resulting from first clearing this deque and then appending the specified `numElements` having the specified `value`&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"]
----
void
xref:bsl/deque-0c/assign-04.adoc[assign](
    xref:bsl/deque-0c/size_type.adoc[size&lowbar;type] numElements,
    VALUE&lowbar;TYPE const& value);
----

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

Assign to this deque the values in the range starting at the specified `first` and ending immediately before the specified `last` iterators of the (template parameter) type `INPUT&lowbar;ITERATOR`&period; The (template parameter) type `INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;input&period;iterators&rsqb;providing access to values of a type convertible to `value&lowbar;type`, and `value&lowbar;type` must be `copy&hyphen;assignable` and `emplace&hyphen;constructible` from `&ast;i` into this deque, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;` (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period; The behavior is undefined unless `first` and `last` refer to a sequence of valid values where `first` is at a position at or before `last`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
void
xref:bsl/deque-0c/assign-06.adoc[assign](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last);
----

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


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