[#bsl-deque-0c-2constructor-0f62]
= xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::deque
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create an empty deque&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-0d6.adoc[deque]();
----

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

Create a deque with the same value as `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-0e.adoc[deque](xref:bsl/deque-0c.adoc[deque] const& original);
----

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

Create a deque by moving from `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-0a.adoc[deque](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;deque&gt;] original);
----

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

Create an empty deque using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/deque-0c/2constructor-01.adoc[deque](ALLOCATOR const& basicAllocator);
----

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

Create a deque of `numElements` value&hyphen;initialized elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/deque-0c/2constructor-0db.adoc[deque](
    xref:bsl/deque-0c/size_type.adoc[size&lowbar;type] numElements,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-08.adoc[deque](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;deque&gt;] original,
    ALLOCATOR const& basicAllocator);
----

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

Create a deque from the elements of `values`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-0c.adoc[deque](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

Create a deque with the value of `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-02.adoc[deque](
    xref:bsl/deque-0c.adoc[deque] const& original,
    ALLOCATOR const& basicAllocator);
----

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

Create a deque of `numElements` copies of `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/2constructor-05.adoc[deque](
    xref:bsl/deque-0c/size_type.adoc[size&lowbar;type] numElements,
    VALUE&lowbar;TYPE const& value,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

Create a deque from the range `&lsqb;first, last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/deque-0c/2constructor-0f6d.adoc[deque](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

Create a deque from the elements of `range`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;RANGE&gt;
xref:bsl/deque-0c/2constructor-06.adoc[deque](
    std::from&lowbar;range&lowbar;t tag,
    t&lowbar;RANGE&& range,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| deque to copy
| *basicAllocator*
| allocator used to supply memory
| *numElements*
| number of elements to create
| *values*
| initializer list of elements to insert
| *value*
| value used to initialize each element
| *first*
| beginning of the range to copy
| *last*
| end of the range to copy
| *tag*
| disambiguation tag for range construction
| *range*
| input range of elements to insert
|===


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