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

Assign to this list the sequence of values, in order, of the elements of the specified range `&lsqb;first &period;&period; last)&rsqb;`&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;24&period;2&period;3&rsqb;providing access to values of a type convertible to `value&lowbar;type`, and `value&lowbar;type` must be `emplace&hyphen;constructible` from `&ast;i` into this list, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;`&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; Note that, to the extent possible, existing elements of this list are copy&hyphen;assigned to, to minimize the number of nodes that need to be copy&hyphen;inserted or erased&period; If an exception is thrown, `&ast;this` is left in a valid but unspecified state&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
void
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]#Created with https://www.mrdocs.com[MrDocs]#
