[#bsl-queue-0a5-2constructor-09f]
= xref:bsl.adoc[bsl]::xref:bsl/queue-0a5.adoc[queue]::queue
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create an empty queue having a container of the parameterized `CONTAINER` type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/queue-0a5/2constructor-0cd.adoc[queue]();
----

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

Create a queue having the value of the specified `original`&period;


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

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

Create a queue by moving from the specified `container`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/queue-0a5/2constructor-0f0.adoc[queue](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;CONTAINER&gt;] container);
----

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

Create a queue by moving from the specified `container`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/queue-0a5/2constructor-06.adoc[queue](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;queue&gt;] container);
----

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

Create a queue having the specified `container` that holds elements of the parameterized `VALUE` type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/queue-0a5/2constructor-09a.adoc[queue](CONTAINER const& container);
----

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

Create an empty queue that uses `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
explicit
xref:bsl/queue-0a5/2constructor-01.adoc[queue](ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITER&gt;
xref:bsl/queue-0a5/2constructor-0fcd.adoc[queue](
    INPUT&lowbar;ITER first,
    INPUT&lowbar;ITER last);
----

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

Create a queue from the elements of the specified `range`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;RANGE&gt;
xref:bsl/queue-0a5/2constructor-0fc5.adoc[queue](
    std::from&lowbar;range&lowbar;t unused,
    t&lowbar;RANGE&& range);
----

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

Create a queue from the specified `container` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/queue-0a5/2constructor-054.adoc[queue](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;CONTAINER&gt;] container,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/queue-0a5/2constructor-056.adoc[queue](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;queue&gt;] original,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

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

Create a queue from `container` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/queue-0a5/2constructor-09d.adoc[queue](
    CONTAINER const& container,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

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

Create a queue from `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/queue-0a5/2constructor-0cc.adoc[queue](
    xref:bsl/queue-0a5.adoc[queue] const& original,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

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

Create a queue from `&lsqb;first, last)&rsqb;` using `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class INPUT&lowbar;ITER,
    class ALLOCATOR&gt;
xref:bsl/queue-0a5/2constructor-0b.adoc[queue](
    INPUT&lowbar;ITER first,
    INPUT&lowbar;ITER last,
    ALLOCATOR const& allocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

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

Create a queue from `range` using `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;RANGE,
    class t&lowbar;ALLOCATOR&gt;
xref:bsl/queue-0a5/2constructor-0f5.adoc[queue](
    std::from&lowbar;range&lowbar;t unused,
    t&lowbar;RANGE&& range,
    t&lowbar;ALLOCATOR const& allocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER,t&lowbar;ALLOCATOR&gt;&colon;&colon;value;
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| queue to copy
| *container*
| container to move from
| *basicAllocator*
| allocator used to supply memory
| *first*
| beginning of the range of elements to insert
| *last*
| end of the range of elements to insert
| *unused*
| tag selecting the from&hyphen;range constructor overload
| *range*
| input range of elements to insert
| *allocator*
| allocator used to supply memory
|===


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