TermOx
|
Wraps std::priority_queue to attach an int priority type to stored objects. More...
#include <priority_queue.hpp>
Public Types | |
using | Priority_t = Priority |
Public Member Functions | |
auto | top () const -> T const & |
Returns a const reference to the element with the highest priority. | |
auto | is_empty () const -> bool |
Returns true if no elements in queue. | |
auto | size () const -> std::size_t |
Returns the number of elements currently in the queue. | |
void | push (Priority p, T const &x) |
Copy an element into the queue with the given priority. | |
void | push (Priority p, T &&x) |
Move an element into the queue with the given priority. | |
auto | pop () -> T |
Moves top element from the queue and returns it, shrinking the queue. | |
Wraps std::priority_queue to attach an int priority type to stored objects.
Uses std::uint8_t as priority type, 0 is lowest priority, 255 is highest.