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.
void
assign(std::initializer_list<value_type> values);
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.
void
assign(
size_type numElements,
value_type const& value);
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.
template<class INPUT_ITERATOR>
void
assign(
INPUT_ITERATOR first,
INPUT_ITERATOR last)
requires !is_arithmetic<INPUT_ITERATOR>::value &&
!is_enum<INPUT_ITERATOR>::value;
Created with MrDocs