From d828e340a80f268a6e51d451a75fb6c2282e17b1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 8 Dec 2004 20:59:18 +0000 Subject: [PATCH] =?UTF-8?q?Define=20the=20pointer=20hash=20struct=20before?= =?UTF-8?q?=20the=20string=20one,=20to=20improve=20compatibility=20with=20?= =?UTF-8?q?ICC.=20=20Patch=20contributed=20by=20Bj=C3=B8rn=20Wennberg.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18663 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/HashExtras.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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