[#bsl-list-054-assign-089] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::assign :relfileprefix: ../../ :mrdocs: `assign` overloads == Synopses Declared in `<bslstl_list.h>` Assign to this list, in order, the sequence of values in the specified `values` initializer list. This method requires that the (template parameter) type `VALUE` be `copy‐assignable` and `copy‐insertable` into this list. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/list-054/assign-081.adoc[assign](std::initializer_list<value_type> values); ---- [.small]#xref:bsl/list-054/assign-081.adoc[_» more..._]# Replace the contents of this list with the specified `numElements` copies of the specified `value`. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/list-054/assign-06.adoc[assign]( xref:bsl/list-054/size_type.adoc[size_type] numElements, xref:bsl/list-054/value_type.adoc[value_type] const& value); ---- [.small]#xref:bsl/list-054/assign-06.adoc[_» more..._]# Assign to this list the sequence of values, in order, of the elements of the specified range `[first .. last)]`. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> void xref:bsl/list-054/assign-0d.adoc[assign]( INPUT_ITERATOR first, INPUT_ITERATOR last) requires !is_arithmetic<INPUT_ITERATOR>::value && !is_enum<INPUT_ITERATOR>::value; ---- [.small]#xref:bsl/list-054/assign-0d.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#