cpp/container/priority queue

A is a container adaptor that provides constant time lookup of the largest (by default) element, at the expense of logarithmic insertion and extraction.

A user-provided can be supplied to change the ordering, e.g. using  would cause the smallest element to appear as the top.

Working with a is similar to managing a heap in some random access container, with the benefit of not being able to accidentally invalidate the heap.