[#bsl-priority_queue-034-2constructor-0f]
= xref:bsl.adoc[bsl]::xref:bsl/priority_queue-034.adoc[priority&lowbar;queue]::priority&lowbar;queue
:relfileprefix: ../../
:mrdocs:

Create an empty priority queue with `comparator` using `basicAllocator`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
priority&lowbar;queue(
    COMPARATOR const& comparator,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

== Description

Create an empty priority queue, adapting a default&hyphen;constructed container of the (template parameter) type `CONTAINER` that uses the specified `basicAllocator` to supply memory, and the specified `comparator` to order elements in the priority queue&period; Note that this constructor is only defined if the underlying container uses allocator&period; Otherwise this constructor is disabled&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *comparator*
| comparator used to order elements
| *basicAllocator*
| allocator used to supply memory
|===


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