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

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

== Synopsis

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

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

== Description

Create an in&hyphen;place queue initialized with the specified `numElements` leading values from the specified `srcArray`&period; Optionally specify the `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `0 &lt;&equals; numElements`&period; Note that `srcArray` must refer to sufficient memory to hold `numElements` values&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *srcArray*
| array of initial values
| *numElements*
| number of leading values to copy
| *basicAllocator*
| allocator used to supply memory
|===


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