From 30cffd2563e06eafb8cf66a40ed2252f62a13237 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Wed, 28 Sep 2011 16:51:54 +0200 Subject: [PATCH] Fix build with GCC 4.2, thanks tolmaion --- DataStructures/HashTable.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/DataStructures/HashTable.h b/DataStructures/HashTable.h index 090fb640a..e37993a1c 100644 --- a/DataStructures/HashTable.h +++ b/DataStructures/HashTable.h @@ -26,6 +26,18 @@ or see http://www.gnu.org/licenses/agpl.txt. #include +#include +#include + +namespace __gnu_cxx +{ + template<> struct hash { + size_t operator()(const std::string& x) const { + return hash()(x.c_str()); + } + }; +} + template class HashTable { typedef google::sparse_hash_map MyHashTable;