bsl::priority_queue::priority_queue

Create a priority queue by moving from container using basicAllocator.

Synopsis

Declared in <bslstl_priorityqueue.h>

template<class ALLOCATOR>
priority_queue(
    COMPARATOR const& comparator,
    BloombergLP::bslmf::MovableRef<CONTAINER> container,
    ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;

Description

Create a priority queue, adapting the specified container that uses the specified basicAllocator to supply memory, and the specified comparator to order elements in the priority queue. Note that this constructor is only defined if the underlying container uses allocator. Otherwise this constructor is disabled.

Parameters

NameDescription
comparatorcomparator used to order elements
containercontainer to move from
basicAllocatorallocator used to supply memory