diff --git a/include/llvm/ADT/HashExtras.h b/include/llvm/ADT/HashExtras.h index f82115a07c5..ab9b302ff1b 100644 --- a/include/llvm/ADT/HashExtras.h +++ b/include/llvm/ADT/HashExtras.h @@ -23,12 +23,6 @@ // Cannot specialize hash template from outside of the std namespace. namespace HASH_NAMESPACE { -template <> struct hash { - size_t operator()(std::string const &str) const { - return hash()(str.c_str()); - } -}; - // Provide a hash function for arbitrary pointers... template struct hash { inline size_t operator()(const T *Val) const { @@ -36,6 +30,12 @@ template struct hash { } }; +template <> struct hash { + size_t operator()(std::string const &str) const { + return hash()(str.c_str()); + } +}; + } // End namespace std #endif