[#bsl-list-054-assign-089]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::assign
:relfileprefix: ../../
:mrdocs:

`assign` overloads

== Synopses

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

Assign to this list the values in the specified `values` list&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/list-054/assign-081.adoc[assign](std::initializer&lowbar;list&lt;value&lowbar;type&gt; values);
----

[.small]#xref:bsl/list-054/assign-081.adoc[_» more&period;&period;&period;_]#

Replace the contents of this list with `numElements` copies of `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/list-054/assign-06.adoc[assign](
    xref:bsl/list-054/size_type.adoc[size&lowbar;type] numElements,
    xref:bsl/list-054/value_type.adoc[value&lowbar;type] const& value);
----

[.small]#xref:bsl/list-054/assign-06.adoc[_» more&period;&period;&period;_]#

Assign to this list the values in the range `&lsqb;first &period;&period; last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
void
xref:bsl/list-054/assign-0d.adoc[assign](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last)
requires !is&lowbar;arithmetic&lt;INPUT&lowbar;ITERATOR&gt;&colon;&colon;value &amp;&amp;
                    !is&lowbar;enum&lt;INPUT&lowbar;ITERATOR&gt;&colon;&colon;value;
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *values*
| initializer list of values to assign
| *numElements*
| number of copies of `value` to assign
| *value*
| value copied into each element
| *first*
| start of the iterator range
| *last*
| one past the end of the iterator range
|===


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