From 1fcbddc846476f9497dcec2bc667a50e426311a0 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Tue, 29 Oct 2013 13:41:20 -0700 Subject: [PATCH] libc++: avoid hash re-definitions The definitions of hash<> for int64_t/uint64_t that were not available on i386 in the __gnu_cxx namespace are available when we switch over to std::tr1 namespace so we remove them to avoid the redefinition errors. Signed-off-by: Noah Watkins --- src/include/types.h | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/include/types.h b/src/include/types.h index 8467c80f375..974edee02fd 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -84,37 +84,6 @@ typedef off_t loff_t; typedef off_t off64_t; #endif -// -- stl crap -- - - -CEPH_HASH_NAMESPACE_START - template<> struct hash< std::string > - { - size_t operator()( const std::string& x ) const - { - static hash H; - return H(x.c_str()); - } - }; - -#ifndef __LP64__ - template<> struct hash { - size_t operator()(int64_t __x) const { - static hash H; - return H((__x >> 32) ^ (__x & 0xffffffff)); - } - }; - template<> struct hash { - size_t operator()(uint64_t __x) const { - static hash H; - return H((__x >> 32) ^ (__x & 0xffffffff)); - } - }; -#endif -CEPH_HASH_NAMESPACE_END - - - // -- io helpers -- template -- 2.47.3