[#bsl-list-054-assign-06] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::assign :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void assign( xref:bsl/list-054/size_type.adoc[size_type] numElements, xref:bsl/list-054/value_type.adoc[value_type] const& value); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#