[#BloombergLP-bdlcc-Queue-2constructor-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Queue.adoc[Queue]::Queue
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

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

Create an empty queue of objects of parameterized `TYPE`&period;


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

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

Create a queue with the specified `highWaterMark` capacity limit&period;


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

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

Create a queue with sufficient initial capacity for `numItems`&period;


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

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

Create a queue containing the values from the specified `srcQueue`&period;


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

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

Create a queue with initial capacity and a high&hyphen;water mark&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/Queue/2constructor-0d.adoc[Queue](
    xref:BloombergLP/bdlcc/Queue/InitialCapacity.adoc[InitialCapacity] const& numItems,
    int highWaterMark,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

Create a queue from `srcQueue` with the specified high&hyphen;water mark&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/Queue/2constructor-09.adoc[Queue](
    xref:BloombergLP/bdlc/Queue.adoc[bdlc::Queue&lt;TYPE&gt;] const& srcQueue,
    int highWaterMark,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| allocator used to supply memory
| *highWaterMark*
| suggested maximum length, or negative for none
| *numItems*
| initial capacity (in items)
| *srcQueue*
| queue whose values are copied into this queue
|===


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