From: trevor_hansen Date: Wed, 26 Jan 2011 05:01:53 +0000 (+0000) Subject: Fix. Thanks to Dan Kaminsky for the report. It didn't compile on gcc 4.1.2 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=100787b5ff5d3198055a8df1012602df28f8b6a6;p=francis%2Fstp.git Fix. Thanks to Dan Kaminsky for the report. It didn't compile on gcc 4.1.2 git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1092 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/parser/LetMgr.cpp b/src/parser/LetMgr.cpp index 9ab65e1..b75ef2b 100644 --- a/src/parser/LetMgr.cpp +++ b/src/parser/LetMgr.cpp @@ -76,6 +76,6 @@ namespace BEEV { void LETMgr::InitializeLetIDMap(void) { - _letid_expr_map = new hash_map(); + _letid_expr_map = new hash_map >(); } //end of InitializeLetIDMap() }; diff --git a/src/parser/LetMgr.h b/src/parser/LetMgr.h index 7fc5a57..51e3148 100644 --- a/src/parser/LetMgr.h +++ b/src/parser/LetMgr.h @@ -12,25 +12,25 @@ #include "../AST/AST.h" - // Hash function for the hash_map of a string.. - _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - template <> - struct hash { - size_t operator() (const std::string& x) const { - return hash()(x.c_str()); - } - }; - }; - namespace BEEV { - //LET Management + +//LET Management class LETMgr { private: + + // Hash function for the hash_map of a string.. + template + struct hashF { + size_t operator() (const T & x) const { + return __gnu_cxx::hash()(x.c_str()); + } + }; + const ASTNode ASTUndefined; - typedef hash_map > MapType; + typedef hash_map > MapType; // MAP: This map is from bound IDs that occur in LETs to // expression. The map is useful in checking replacing the IDs