8 #ifndef WPIUTIL_WPI_PRIORITYQUEUE_H_
9 #define WPIUTIL_WPI_PRIORITYQUEUE_H_
22 template <
class T,
class Container = std::vector<T>,
23 class Compare = std::less<
typename Container::value_type>>
24 class PriorityQueue :
public std::priority_queue<T, Container, Compare> {
26 bool remove(
const T& value) {
27 auto it = std::find(this->c.begin(), this->c.end(), value);
28 if (it != this->c.end()) {
30 std::make_heap(this->c.begin(), this->c.end(), this->comp);
40 #endif // WPIUTIL_WPI_PRIORITYQUEUE_H_
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21
This class adds a method for removing all elements from the priority queue matching the given value...
Definition: PriorityQueue.h:24