[#bsl-slist-assign-0b]
= xref:bsl.adoc[bsl]::xref:bsl/slist.adoc[slist]::assign
:relfileprefix: ../../
:mrdocs:

Replace the contents of this list with `&lowbar;&lowbar;n` copies of `&lowbar;&lowbar;val`&period;

== Synopsis

Declared in `&lt;bslstp&lowbar;slist&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
assign(
    xref:bsl/slist/size_type.adoc[size&lowbar;type] &lowbar;&lowbar;n,
    &lowbar;Tp const& &lowbar;&lowbar;val);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
