[#bsl-slist-2constructor-07]
= xref:bsl.adoc[bsl]::xref:bsl/slist.adoc[slist]::slist
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create a list as a copy of the specified list&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/slist/2constructor-01a.adoc[slist](xref:bsl/slist.adoc[&lowbar;Self] const& &lowbar;&lowbar;x);
----

[.small]#xref:bsl/slist/2constructor-01a.adoc[_» more&period;&period;&period;_]#

Create an empty list using the specified allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/slist/2constructor-0f.adoc[slist](xref:bsl/slist/allocator_type.adoc[allocator&lowbar;type] const& &lowbar;&lowbar;a = allocator&lowbar;type());
----

[.small]#xref:bsl/slist/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Create a list as a copy of `&lowbar;&lowbar;x` using the specified allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/slist/2constructor-01c.adoc[slist](
    xref:bsl/slist.adoc[&lowbar;Self] const& &lowbar;&lowbar;x,
    xref:bsl/slist/allocator_type.adoc[allocator&lowbar;type] const& &lowbar;&lowbar;a);
----

[.small]#xref:bsl/slist/2constructor-01c.adoc[_» more&period;&period;&period;_]#

Create a list with `&lowbar;&lowbar;n` copies of `&lowbar;&lowbar;x` using the specified allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/slist/2constructor-09.adoc[slist](
    xref:bsl/slist/size_type.adoc[size&lowbar;type] &lowbar;&lowbar;n,
    xref:bsl/slist/value_type.adoc[value&lowbar;type] const& &lowbar;&lowbar;x = &lowbar;Tp(),
    xref:bsl/slist/allocator_type.adoc[allocator&lowbar;type] const& &lowbar;&lowbar;a = allocator&lowbar;type());
----

[.small]#xref:bsl/slist/2constructor-09.adoc[_» more&period;&period;&period;_]#

Create a list from the specified iterator range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class &lowbar;InputIterator&gt;
xref:bsl/slist/2constructor-0d.adoc[slist](
    &lowbar;InputIterator &lowbar;&lowbar;first,
    &lowbar;InputIterator &lowbar;&lowbar;last,
    xref:bsl/slist/allocator_type.adoc[allocator&lowbar;type] const& &lowbar;&lowbar;a = allocator&lowbar;type());
----

[.small]#xref:bsl/slist/2constructor-0d.adoc[_» more&period;&period;&period;_]#


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