bsl::list::assign

Replace the contents of this list with numElements copies of value.

Synopsis

Declared in <bslstl_list.h>

void
assign(
    size_type numElements,
    value_type const& value);

Description

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.

Parameters

NameDescription
numElementsnumber of copies of value to assign
valuevalue copied into each element