]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Fix. Thanks to Dan Kaminsky for the report. It didn't compile on gcc 4.1.2
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 26 Jan 2011 05:01:53 +0000 (05:01 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 26 Jan 2011 05:01:53 +0000 (05:01 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1092 e59a4935-1847-0410-ae03-e826735625c1

src/parser/LetMgr.cpp
src/parser/LetMgr.h

index 9ab65e1a03172ffebe86004a3c58837477414d1e..b75ef2b42583de36cd4f8942418525bdb0ecb60d 100644 (file)
@@ -76,6 +76,6 @@ namespace BEEV {
 
   void LETMgr::InitializeLetIDMap(void)
   {
-    _letid_expr_map = new hash_map<string,ASTNode>();
+    _letid_expr_map = new hash_map<string,ASTNode, hashF<std::string> >();
   } //end of InitializeLetIDMap()
 };
index 7fc5a57caa44d698dd2a69bd26ef732d6e2649e8..51e3148b23765666addfb15382b0b78ed1a6ea9b 100644 (file)
 
 #include "../AST/AST.h"
 
-  // Hash function for the hash_map of a string..
-  _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-  template <>
-        struct hash<std::string> {
-                size_t operator() (const std::string& x) const {
-                        return hash<const char*>()(x.c_str());
-                }
-        };
-  };
-
 namespace BEEV
 {
-  //LET Management
+
+//LET Management
   class LETMgr 
   {
   private:
+
+         // Hash function for the hash_map of a string..
+       template <class T>
+       struct hashF {
+                                 size_t operator() (const T & x) const {
+                                                 return __gnu_cxx::hash<const char*>()(x.c_str());
+                                 }
+                 };
+
     const ASTNode ASTUndefined;
 
-    typedef hash_map<string,ASTNode, __gnu_cxx::hash<std::string> > MapType;
+    typedef hash_map<string,ASTNode, hashF<std::string> > MapType;
 
     // MAP: This map is from bound IDs that occur in LETs to
     // expression. The map is useful in checking replacing the IDs