summaryrefslogtreecommitdiff
path: root/proofs/lfsc_checker/expr.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2017-07-29 18:06:30 -0700
committerGitHub <noreply@github.com>2017-07-29 18:06:30 -0700
commitcc4323cf943a0d146a307ecb103544732c76e824 (patch)
treea5cf5a3570234c28c515be4f820fa9c8a5559b6b /proofs/lfsc_checker/expr.h
parent08a2bc7e1151d83fbe38a8b43c00b2f822ddfe38 (diff)
Change remaining hash_set -> unordered_set (#208)
The nightly competition build has been failing due to a remaining use of hash_set in approx_simplex.cpp. This commit changes the remaining uses of hash_set to unordered_set. The remaining uses of hash_set were in LFSC. Switching to C++11 for LFSC required changing the configure.ac for LFSC to require C++11 support to make sure that it can be compiled independently from the rest of CVC4 (some of our Travis tests do that as well). To have the macros for these additional checks available, the commit adds a symlink to the files in config that contain the macros). I did not find a way to add macros from a parent's folder that did not break `make distcheck
Diffstat (limited to 'proofs/lfsc_checker/expr.h')
-rw-r--r--proofs/lfsc_checker/expr.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/proofs/lfsc_checker/expr.h b/proofs/lfsc_checker/expr.h
index 632aaa18a..0677533da 100644
--- a/proofs/lfsc_checker/expr.h
+++ b/proofs/lfsc_checker/expr.h
@@ -2,11 +2,12 @@
#define sc2__expr_h
#include <stdint.h>
-#include <ext/hash_set>
#include <iostream>
#include <map>
#include <string>
+#include <unordered_set>
#include <vector>
+
#include "chunking_memory_management.h"
#include "gmp.h"
@@ -57,21 +58,17 @@ enum { NOT_CEXPR = 0, // for INT_EXPR, HOLE_EXPR, SYM_EXPR, SYMS_EXPR
class Expr;
class SymExpr;
-namespace __gnu_cxx {
-template <>
-struct hash<Expr *> {
+struct hashExprPtr {
size_t operator()(const Expr *x) const {
return reinterpret_cast<uintptr_t>(x);
}
};
-}
struct eqExprPtr {
bool operator()(const Expr *e1, const Expr *e2) const { return e1 == e2; }
};
-typedef __gnu_cxx::hash_set<Expr *, __gnu_cxx::hash<Expr *>, eqExprPtr>
- expr_ptr_set_t;
+typedef std::unordered_set<Expr *, hashExprPtr, eqExprPtr> expr_ptr_set_t;
class Expr {
protected:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback