Constructors
Synopses
Declared in <bslstl_priorityqueue.h>
Create an empty priority queue.
Create a priority queue having the value of the specified original.
priority_queue(priority_queue const& original);
Create a priority queue by moving from the specified original.
Create an empty priority queue with the specified comparator.
explicit
priority_queue(COMPARATOR const& comparator);
Create an empty priority queue that uses basicAllocator.
template<class ALLOCATOR>
explicit
priority_queue(ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a priority queue by moving from container with comparator.
explicit
priority_queue(
COMPARATOR const& comparator,
BloombergLP::bslmf::MovableRef<CONTAINER> container);
Create a priority queue adapting container with comparator.
priority_queue(
COMPARATOR const& comparator,
CONTAINER const& container);
Create a priority queue from the range [first, last)].
template<class INPUT_ITERATOR>
priority_queue(
INPUT_ITERATOR first,
INPUT_ITERATOR last);
Create a priority queue by moving from original using basicAllocator.
template<class ALLOCATOR>
priority_queue(
BloombergLP::bslmf::MovableRef<priority_queue> original,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create an empty priority queue with comparator using basicAllocator.
template<class ALLOCATOR>
priority_queue(
COMPARATOR const& comparator,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a priority queue from original using basicAllocator.
template<class ALLOCATOR>
priority_queue(
priority_queue const& original,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a priority queue from the elements of the specified range.
template<class t_RANGE>
priority_queue(
std::from_range_t unused,
t_RANGE&& range,
COMPARATOR const& comparator = COMPARATOR());
Create a priority queue by moving from container using basicAllocator.
template<class ALLOCATOR>
priority_queue(
COMPARATOR const& comparator,
BloombergLP::bslmf::MovableRef<CONTAINER> container,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a priority queue from container using basicAllocator.
template<class ALLOCATOR>
priority_queue(
COMPARATOR const& comparator,
CONTAINER const& container,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a priority queue from range using allocator.
template<
class t_RANGE,
class t_ALLOCATOR>
priority_queue(
std::from_range_t unused,
t_RANGE&& range,
t_ALLOCATOR const& allocator)
requires bsl::uses_allocator<CONTAINER,
t_ALLOCATOR>::value;
Create a priority queue from [first, last)] by moving from container.
template<class INPUT_ITERATOR>
priority_queue(
INPUT_ITERATOR first,
INPUT_ITERATOR last,
COMPARATOR const& comparator,
BloombergLP::bslmf::MovableRef<CONTAINER> container);
Create a priority queue from [first, last)] adapting container.
template<class INPUT_ITERATOR>
priority_queue(
INPUT_ITERATOR first,
INPUT_ITERATOR last,
COMPARATOR const& comparator,
CONTAINER const& container);
Create a priority queue from range with comparator and allocator.
template<
class t_RANGE,
class t_ALLOCATOR>
priority_queue(
std::from_range_t unused,
t_RANGE&& range,
COMPARATOR const& comparator,
t_ALLOCATOR const& allocator)
requires bsl::uses_allocator<CONTAINER,
t_ALLOCATOR>::value;
Parameters
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‐range constructor overload |
range |
input range of elements to insert |
allocator |
allocator used to supply memory |
Created with MrDocs