[#BloombergLP-bdlc-Queue-2constructor-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/Queue.adoc[Queue]::Queue
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

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

Create an empty in&hyphen;place queue&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/Queue/2constructor-027f.adoc[Queue](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/Queue/2constructor-027f.adoc[_» more&period;&period;&period;_]#

Create an in&hyphen;place queue of the specified `initialLength`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/Queue/2constructor-045.adoc[Queue](
    unsigned int initialLength,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/Queue/2constructor-045.adoc[_» more&period;&period;&period;_]#

Create an empty queue with the specified initial capacity&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/Queue/2constructor-0a.adoc[Queue](
    xref:BloombergLP/bdlc/Queue/InitialCapacity.adoc[InitialCapacity] const& numElements,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/Queue/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Create an in&hyphen;place queue having the same value as `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/Queue/2constructor-0273.adoc[Queue](
    xref:BloombergLP/bdlc/Queue.adoc[Queue] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/Queue/2constructor-0273.adoc[_» more&period;&period;&period;_]#

Create an in&hyphen;place queue of `initialLength` copies of `initialValue`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/Queue/2constructor-04b.adoc[Queue](
    int initialLength,
    T const& initialValue,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/Queue/2constructor-04b.adoc[_» more&period;&period;&period;_]#

Create a queue from the leading `numElements` of `srcArray`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/Queue/2constructor-02d.adoc[Queue](
    T const* srcArray,
    int numElements,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/Queue/2constructor-02d.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| memory allocator&semi; null uses the default
| *initialLength*
| initial number of elements
| *numElements*
| initial capacity specifier
| *original*
| queue providing the value to copy
| *initialValue*
| value used to initialize each element
| *srcArray*
| array of initial values
|===


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