| Index: src/zone-containers.h
|
| diff --git a/src/zone-containers.h b/src/zone-containers.h
|
| index 79b168c37eab7a16969d1b91384ba1f74e3d0423..2b7d110eaa70121bad08b0f03fd7f052e55f0a70 100644
|
| --- a/src/zone-containers.h
|
| +++ b/src/zone-containers.h
|
| @@ -122,6 +122,18 @@ class ZoneMap
|
| Compare(), zone_allocator<std::pair<const K, V>>(zone)) {}
|
| };
|
|
|
| +// A wrapper subclass for std::multimap to make it easy to construct one that
|
| +// uses a zone allocator.
|
| +template <typename K, typename V, typename Compare = std::less<K>>
|
| +class ZoneMultimap
|
| + : public std::multimap<K, V, Compare,
|
| + zone_allocator<std::pair<const K, V>>> {
|
| + public:
|
| + // Constructs an empty multimap.
|
| + explicit ZoneMultimap(Zone* zone)
|
| + : std::multimap<K, V, Compare, zone_allocator<std::pair<const K, V>>>(
|
| + Compare(), zone_allocator<std::pair<const K, V>>(zone)) {}
|
| +};
|
|
|
| // Typedefs to shorten commonly used vectors.
|
| typedef ZoneVector<bool> BoolVector;
|
|
|