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

`assign` overloads

== Synopses

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

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


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

[.small]#xref:bsl/slist/assign-0b.adoc[_» more&period;&period;&period;_]#

Replace the contents of this list with the range `&lsqb;&lowbar;&lowbar;first, &lowbar;&lowbar;last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class &lowbar;InputIterator&gt;
void
xref:bsl/slist/assign-07.adoc[assign](
    &lowbar;InputIterator &lowbar;&lowbar;first,
    &lowbar;InputIterator &lowbar;&lowbar;last);
----

[.small]#xref:bsl/slist/assign-07.adoc[_» more&period;&period;&period;_]#


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