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

Constructors

== Synopses

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

Create an empty priority queue&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/priority_queue-034/2constructor-04.adoc[priority&lowbar;queue]();
----

[.small]#xref:bsl/priority_queue-034/2constructor-04.adoc[_» more&period;&period;&period;_]#

Create a priority queue having the value of the specified `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/priority_queue-034/2constructor-02f.adoc[priority&lowbar;queue](xref:bsl/priority_queue-034.adoc[priority&lowbar;queue] const& original);
----

[.small]#xref:bsl/priority_queue-034/2constructor-02f.adoc[_» more&period;&period;&period;_]#

Create a priority queue by moving from the specified `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/priority_queue-034/2constructor-073.adoc[priority&lowbar;queue](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;priority&lowbar;queue&gt;] original);
----

[.small]#xref:bsl/priority_queue-034/2constructor-073.adoc[_» more&period;&period;&period;_]#

Create an empty priority queue with the specified `comparator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/priority_queue-034/2constructor-0aa.adoc[priority&lowbar;queue](COMPARATOR const& comparator);
----

[.small]#xref:bsl/priority_queue-034/2constructor-0aa.adoc[_» more&period;&period;&period;_]#

Create an empty priority queue that uses `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
explicit
xref:bsl/priority_queue-034/2constructor-00.adoc[priority&lowbar;queue](ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-00.adoc[_» more&period;&period;&period;_]#

Create a priority queue by moving from `container` with `comparator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/priority_queue-034/2constructor-098.adoc[priority&lowbar;queue](
    COMPARATOR const& comparator,
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;CONTAINER&gt;] container);
----

[.small]#xref:bsl/priority_queue-034/2constructor-098.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/priority_queue-034/2constructor-0a5.adoc[priority&lowbar;queue](
    COMPARATOR const& comparator,
    CONTAINER const& container);
----

[.small]#xref:bsl/priority_queue-034/2constructor-0a5.adoc[_» more&period;&period;&period;_]#

Create a priority queue from the range `&lsqb;first, last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/priority_queue-034/2constructor-0dc.adoc[priority&lowbar;queue](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last);
----

[.small]#xref:bsl/priority_queue-034/2constructor-0dc.adoc[_» more&period;&period;&period;_]#

Create a priority queue by moving from `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-03f.adoc[priority&lowbar;queue](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;priority&lowbar;queue&gt;] original,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-03f.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-0f.adoc[priority&lowbar;queue](
    COMPARATOR const& comparator,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Create a priority queue from `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-0b.adoc[priority&lowbar;queue](
    xref:bsl/priority_queue-034.adoc[priority&lowbar;queue] const& original,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-0b.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;RANGE&gt;
xref:bsl/priority_queue-034/2constructor-03d.adoc[priority&lowbar;queue](
    std::from&lowbar;range&lowbar;t unused,
    t&lowbar;RANGE&& range,
    COMPARATOR const& comparator = COMPARATOR());
----

[.small]#xref:bsl/priority_queue-034/2constructor-03d.adoc[_» more&period;&period;&period;_]#

Create a priority queue by moving from `container` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-074.adoc[priority&lowbar;queue](
    COMPARATOR const& comparator,
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;CONTAINER&gt;] container,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-074.adoc[_» more&period;&period;&period;_]#

Create a priority queue from `container` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-093.adoc[priority&lowbar;queue](
    COMPARATOR const& comparator,
    CONTAINER const& container,
    ALLOCATOR const& basicAllocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER, ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-093.adoc[_» more&period;&period;&period;_]#

Create a priority queue from `range` using `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;RANGE,
    class t&lowbar;ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-06.adoc[priority&lowbar;queue](
    std::from&lowbar;range&lowbar;t unused,
    t&lowbar;RANGE&& range,
    t&lowbar;ALLOCATOR const& allocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER,
                                                          t&lowbar;ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-06.adoc[_» more&period;&period;&period;_]#

Create a priority queue from `&lsqb;first, last)&rsqb;` by moving from `container`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/priority_queue-034/2constructor-021.adoc[priority&lowbar;queue](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    COMPARATOR const& comparator,
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;CONTAINER&gt;] container);
----

[.small]#xref:bsl/priority_queue-034/2constructor-021.adoc[_» more&period;&period;&period;_]#

Create a priority queue from `&lsqb;first, last)&rsqb;` adapting `container`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/priority_queue-034/2constructor-030.adoc[priority&lowbar;queue](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    COMPARATOR const& comparator,
    CONTAINER const& container);
----

[.small]#xref:bsl/priority_queue-034/2constructor-030.adoc[_» more&period;&period;&period;_]#

Create a priority queue from `range` with `comparator` and `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;RANGE,
    class t&lowbar;ALLOCATOR&gt;
xref:bsl/priority_queue-034/2constructor-05.adoc[priority&lowbar;queue](
    std::from&lowbar;range&lowbar;t unused,
    t&lowbar;RANGE&& range,
    COMPARATOR const& comparator,
    t&lowbar;ALLOCATOR const& allocator)
requires bsl&colon;&colon;uses&lowbar;allocator&lt;CONTAINER,
                                                          t&lowbar;ALLOCATOR&gt;&colon;&colon;value;
----

[.small]#xref:bsl/priority_queue-034/2constructor-05.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| priority queue to copy
| *comparator*
| comparator used to order elements
| *basicAllocator*
| allocator used to supply memory
| *container*
| container to move from
| *first*
| beginning of the range of elements to insert
| *last*
| end of the range of elements to insert
| *unused*
| tag selecting the from&hyphen;range constructor overload
| *range*
| input range of elements to insert
| *allocator*
| allocator used to supply memory
|===


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