[#bsl-slist-2constructor-07] = xref:bsl.adoc[bsl]::xref:bsl/slist.adoc[slist]::slist :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<bslstp_slist.h>` Create a list as a copy of the specified list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/slist/2constructor-01a.adoc[slist](xref:bsl/slist.adoc[_Self] const& __x); ---- [.small]#xref:bsl/slist/2constructor-01a.adoc[_» more..._]# Create an empty list using the specified allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:bsl/slist/2constructor-0f.adoc[slist](xref:bsl/slist/allocator_type.adoc[allocator_type] const& __a = allocator_type()); ---- [.small]#xref:bsl/slist/2constructor-0f.adoc[_» more..._]# Create a list as a copy of `__x` using the specified allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/slist/2constructor-01c.adoc[slist]( xref:bsl/slist.adoc[_Self] const& __x, xref:bsl/slist/allocator_type.adoc[allocator_type] const& __a); ---- [.small]#xref:bsl/slist/2constructor-01c.adoc[_» more..._]# Create a list with `__n` copies of `__x` using the specified allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:bsl/slist/2constructor-09.adoc[slist]( xref:bsl/slist/size_type.adoc[size_type] __n, xref:bsl/slist/value_type.adoc[value_type] const& __x = _Tp(), xref:bsl/slist/allocator_type.adoc[allocator_type] const& __a = allocator_type()); ---- [.small]#xref:bsl/slist/2constructor-09.adoc[_» more..._]# Create a list from the specified iterator range. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class _InputIterator> xref:bsl/slist/2constructor-0d.adoc[slist]( _InputIterator __first, _InputIterator __last, xref:bsl/slist/allocator_type.adoc[allocator_type] const& __a = allocator_type()); ---- [.small]#xref:bsl/slist/2constructor-0d.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#