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

Create a priority queue from the elements of the specified `range`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;RANGE&gt;
priority&lowbar;queue(
    std::from&lowbar;range&lowbar;t unused,
    t&lowbar;RANGE&& range,
    COMPARATOR const& comparator = COMPARATOR());
----

== Description

Create a priority queue from the elements of the specified `range`&period; Optionally specify a `comparator` used to order elements in the priority queue&period; Optionally supply an `allocator` to supply memory&period; If `allocator` is not supplied and if `CONTAINER` is allocator aware, the currently installed default allocator is used&period; Note that `range` must (minimally) meet the requirements of an input range and the values from the range must have a type matching or convertible to (template parameter) `VALUE`&period; Also note that the constructor overloads that take allocators are defined only if the underlying `CONTAINTER` is allocator aware&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *unused*
| tag selecting the from&hyphen;range constructor overload
| *range*
| input range of elements to insert
| *comparator*
| comparator used to order elements
|===


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