diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
commit | 697954c15da58bd8b186dbafdedd8b06db770201 (patch) | |
tree | e119a71f09b5c2513c8c270161ae2a858c6f3b96 /include/Support/HashExtras.h | |
parent | 13c4659220bc78a0a3529f4d9e57546e898088e3 (diff) |
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/HashExtras.h')
-rw-r--r-- | include/Support/HashExtras.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/Support/HashExtras.h b/include/Support/HashExtras.h index 6ea831e78f..d7e48a3b62 100644 --- a/include/Support/HashExtras.h +++ b/include/Support/HashExtras.h @@ -11,7 +11,10 @@ #define LLVM_SUPPORT_HASHEXTRAS_H #include <string> -#include <hash_map> +#include <ext/hash_map> + +// Cannot specialize hash template from outside of the std namespace. +namespace std { template <> struct hash<string> { size_t operator()(string const &str) const { @@ -24,4 +27,6 @@ template <class T> struct hash<T *> { inline size_t operator()(const T *Val) const { return (size_t)Val; } }; +} // End namespace std + #endif |