Partager via


priority_queue Members

Reference

Constructors

priority_queue

Constructs a priority_queue that is empty or that is a copy of a range of a base container object or of other priority_queue.

Typedefs

container_type

A type that provides the base container to be adapted by a priority_queue.

size_type

An unsigned integer type that can represent the number of elements in a priority_queue.

value_type

A type that represents the type of object stored as an element in a priority_queue.

Member Functions

empty

Tests if the priority_queue is empty.

pop

Removes the largest element of the priority_queue from the top position.

push

Adds an element to the priority queue based on the priority of the element from operator<.

size

Returns the number of elements in the priority_queue.

top

Returns a const reference to the largest element at the top of the priority_queue.

See Also

Concepts

priority_queue Class

Thread Safety in the Standard C++ Library

Standard Template Library