diff options
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 |