summaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/symbol_table.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/parser/symbol_table.h b/src/parser/symbol_table.h
index bfa38ec28..5838790a8 100644
--- a/src/parser/symbol_table.h
+++ b/src/parser/symbol_table.h
@@ -23,18 +23,15 @@
#include <ext/hash_map>
-namespace __gnu_cxx {
-template<>
- struct hash<std::string> {
- size_t operator()(const std::string& str) const {
- return hash<const char*>()(str.c_str());
- }
- };
-}/* __gnu_cxx namespace */
-
namespace CVC4 {
namespace parser {
+struct StringHashFcn {
+ size_t operator()(const std::string& str) const {
+ return __gnu_cxx::hash<const char*>()(str.c_str());
+ }
+};
+
/**
* Generic symbol table for looking up variables by name.
*/
@@ -44,12 +41,9 @@ class SymbolTable {
private:
/** The name to expression bindings */
- typedef __gnu_cxx::hash_map<std::string, ObjectType>
+ typedef __gnu_cxx::hash_map<std::string, ObjectType, StringHashFcn>
LookupTable;
-/*
- typedef __gnu_cxx::hash_map<std::string, std::stack<ObjectType> >
- LookupTable;
-*/
+
/** The table iterator */
typedef typename LookupTable::iterator table_iterator;
/** The table iterator */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback