+/** @brief A hash which works with more stuff
+ *
+ * It can hash pairs: the standard hash currently doesn't include this.
+ */
+template <class X> class hash : public std::hash<X> {
+};
+
+template <class X, class Y> class hash<std::pair<X, Y>> {
+public:
+ std::size_t operator()(std::pair<X, Y> const& x) const
+ {
+ hash<X> h1;
+ hash<X> h2;
+ return h1(x.first) ^ h2(x.second);
+ }
+};
+