[#bsl-list-054-2constructor-09]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::list
:relfileprefix: ../../
:mrdocs:

Create a list from the specified `values` initializer list&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;list&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
list(
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

== Description

Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is not supplied, a default&hyphen;constructed object of the (template parameter) type `ALLOCATOR` is used&period; If the type `ALLOCATOR` is `bsl&colon;&colon;allocator` (the default), then `basicAllocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the type `ALLOCATOR` is `bsl&colon;&colon;allocator` and `basicAllocator` is not supplied, the currently installed default allocator is used&period; This method requires that the (template parameter) `VALUE` be `copy&hyphen;insertable` into this list (see &lcub;Requirements on `VALUE`&rcub;)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *values*
| initializer list of values to append
| *basicAllocator*
| allocator used to supply memory
|===


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