Index: src/zone-containers.h |
diff --git a/src/zone-containers.h b/src/zone-containers.h |
index 0a599bcf2b0501500fc4a17369728a7660cc8107..fc57c04adc56a394241e93380aca9de7cccf328a 100644 |
--- a/src/zone-containers.h |
+++ b/src/zone-containers.h |
@@ -63,6 +63,17 @@ class ZoneLinkedList : public std::list<T, zone_allocator<T>> { |
}; |
+// A wrapper subclass std::priority_queue to make it easy to construct one |
+// that uses a zone allocator. |
+template <typename T, typename Compare = std::less<T>> |
+class ZonePriorityQueue : public std::priority_queue<T, ZoneVector<T>> { |
+ public: |
+ // Constructs an empty list. |
+ explicit ZonePriorityQueue(Zone* zone) |
+ : std::priority_queue<T, ZoneVector<T>>(Compare(), ZoneVector<T>(zone)) {} |
+}; |
+ |
+ |
// A wrapper subclass for std::queue to make it easy to construct one |
// that uses a zone allocator. |
template <typename T> |