Create an empty priority queue with comparator using basicAllocator.

Synopsis

Declared in <bslstl_priorityqueue.h>

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

Description

Create an empty priority queue, adapting a default‐constructed container of the (template parameter) type 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

Name

Description

comparator

comparator used to order elements

basicAllocator

allocator used to supply memory

Created with MrDocs