diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-01-16 18:24:03 -0800 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2020-01-16 18:24:03 -0800 |
commit | 4f8b0669a0ed5f17d4c5be7f45c04e6d438837d7 (patch) | |
tree | 3bf6a48d919f1302ba5276e0728a9a5d34b205c7 | |
parent | 26e90a57685df53b178b44bd06b0fec537cf2c3a (diff) |
Explicit hash function
-rw-r--r-- | src/theory/strings/skolem_cache.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/theory/strings/skolem_cache.h b/src/theory/strings/skolem_cache.h index a68c5d713..040896a76 100644 --- a/src/theory/strings/skolem_cache.h +++ b/src/theory/strings/skolem_cache.h @@ -113,6 +113,16 @@ class SkolemCache // where n is the number of occurrences of b in a, and k(0)=0. SK_OCCUR_INDEX, }; + + struct EnumHash + { + template <typename T> + std::size_t operator()(T t) const + { + return static_cast<std::size_t>(t); + } + }; + /** * Returns a skolem of type string that is cached for (a,b,id) and has * name c. @@ -163,7 +173,7 @@ class SkolemCache /** the set of all skolems we have generated */ std::unordered_set<Node, NodeHashFunction> d_allSkolems; - std::unordered_map<SkolemId, Node> d_skolemUfs; + std::unordered_map<SkolemId, Node, EnumHash> d_skolemUfs; }; } // namespace strings |