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

Create a priority queue adapting `container` with `comparator`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
priority&lowbar;queue(
    COMPARATOR const& comparator,
    CONTAINER const& container);
----

== Description

Create a priority queue, adapting the specified `container` of the (template parameter) type `CONTAINER`, and having the specified `comparator` of the (template parameter) type `COMPARATOR` to order elements in the priority queue&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *comparator*
| comparator used to order elements
| *container*
| container whose contents initialize this priority queue
|===


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