diff options
Diffstat (limited to 'src/util/hash.h')
-rw-r--r-- | src/util/hash.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/hash.h b/src/util/hash.h index 2420b7acd..1d360783a 100644 --- a/src/util/hash.h +++ b/src/util/hash.h @@ -54,6 +54,13 @@ struct StringHashFunction { } };/* struct StringHashFunction */ +template <class T, class U, class HashT = std::hash<T>, class HashU = std::hash<U> > +struct PairHashFunction { + size_t operator()(const std::pair<T, U>& pr) const { + return HashT()(pr.first) ^ HashU()(pr.second); + } +};/* struct PairHashFunction */ + }/* CVC4 namespace */ #endif /* __CVC4__HASH_H */ |