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

Create a list by moving from `original`, using `basicAllocator`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
list(
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;list&gt;] original,
    ALLOCATOR const& basicAllocator);
----

== Description

The contents of `original` are moved (in constant time) to the new list if `basicAllocator &equals;&equals; original&period;get&lowbar;allocator()`, and are move&hyphen;inserted (in linear time) using `basicAllocator` otherwise&period; `original` is left in a valid but unspecified state&period; This method requires that the (template parameter) `VALUE` be `move&hyphen;insertable` into this list (see &lcub;Requirements on `VALUE`&rcub;)&period; Note that a `bslma&colon;&colon;Allocator &ast;` can be supplied for `basicAllocator` if the (template parameter) `ALLOCATOR` is `bsl&colon;&colon;allocator` (the default)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| list whose contents are moved into this list
| *basicAllocator*
| allocator used to supply memory
|===


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