From 20820daece2eaf340a944ff386ffbafed1b79b75 Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Tue, 27 Apr 2021 07:31:58 +0200 Subject: Use std::hash for API types (#6432) This PR replaces all api::*HashFunction objects by specializations of std::hash. std::hash is meant to be extended in this way, and it allows for a much cleaner usage of std::unordered_set and std::unordered_map with these types. --- src/expr/symbol_manager.cpp | 4 ++-- src/expr/symbol_table.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/expr') diff --git a/src/expr/symbol_manager.cpp b/src/expr/symbol_manager.cpp index 4e9b7822b..c6eb8d08e 100644 --- a/src/expr/symbol_manager.cpp +++ b/src/expr/symbol_manager.cpp @@ -28,8 +28,8 @@ namespace cvc5 { class SymbolManager::Implementation { - using TermStringMap = CDHashMap; - using TermSet = CDHashSet; + using TermStringMap = CDHashMap>; + using TermSet = CDHashSet>; using SortList = CDList; using TermList = CDList; diff --git a/src/expr/symbol_table.cpp b/src/expr/symbol_table.cpp index 9e1fe9582..762120b5b 100644 --- a/src/expr/symbol_table.cpp +++ b/src/expr/symbol_table.cpp @@ -91,7 +91,7 @@ class OverloadedTypeTrie { public: OverloadedTypeTrie(Context* c, bool allowFunVariants = false) : d_overloaded_symbols( - new (true) CDHashSet(c)), + new (true) CDHashSet>(c)), d_allowFunctionVariants(allowFunVariants) { } @@ -153,7 +153,7 @@ class OverloadedTypeTrie { * above. */ std::unordered_map d_overload_type_arg_trie; /** The set of overloaded symbols. */ - CDHashSet* d_overloaded_symbols; + CDHashSet>* d_overloaded_symbols; /** allow function variants * This is true if we allow overloading (non-constant) functions that expect * the same argument types. -- cgit v1.2.3