priority_queue |
With this adapter, you can use any sequential container that has a random access iterator to maintain a sorted collection of items. Use this adapter to specify a comparator to sort the items.
#include <queue>
template< class T, class Container, class Compare >
class priority_queue
Compare()
(default less< T > ), and using Container
(default vector<
T > ) as the queue's internal data structure. The allocator Container::allocator_type()
is used to manage storage.vector< T > ) as
the queue's internal data structure . The
allocator Container::allocator_type() is used
to manage storage.vector< T > ) as
the queue's internal data structure .[
first , last
) , using the comparator Compare()
(default less< T > ) to order the
container. Container (default vector<
T > ) is used as the queue's internal data structure.[
first , last
) , using compare to
order the container. Container (default vector<
T > ) is used as the queue's internal data structure.true
if the queue contains no elements.Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.