Create a priority queue from the elements of the specified range.

Synopsis

Declared in <bslstl_priorityqueue.h>

template<class t_RANGE>
priority_queue(
    std::from_range_t unused,
    t_RANGE&& range,
    COMPARATOR const& comparator = COMPARATOR());

Description

Create a priority queue from the elements of the specified range. Optionally specify a comparator used to order elements in the priority queue. Optionally supply an allocator to supply memory. If allocator is not supplied and if CONTAINER is allocator aware, the currently installed default allocator is used. 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. Also note that the constructor overloads that take allocators are defined only if the underlying CONTAINTER is allocator aware.

Parameters

Name

Description

unused

tag selecting the from‐range constructor overload

range

input range of elements to insert

comparator

comparator used to order elements

Created with MrDocs