[#bsl-list-054-assign-0d] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::assign :relfileprefix: ../../ :mrdocs: Assign to this list the values in the range `[first .. last)]`. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> void assign( INPUT_ITERATOR first, INPUT_ITERATOR last) requires !is_arithmetic<INPUT_ITERATOR>::value && !is_enum<INPUT_ITERATOR>::value; ---- == Description The (template parameter) type `INPUT_ITERATOR` shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3]providing access to values of a type convertible to `value_type`, and `value_type` must be `emplace‐constructible` from `*i` into this list, where `i` is a dereferenceable iterator in the range `[first .. last)]`. 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`. Note that, to the extent possible, existing elements of this list are copy‐assigned to, to minimize the number of nodes that need to be copy‐inserted or erased. If an exception is thrown, `*this` is left in a valid but unspecified state. == Parameters [cols="1,4"] |=== | Name| Description | *first* | start of the iterator range | *last* | one past the end of the iterator range |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#