From: Noah Watkins Date: Tue, 29 Oct 2013 20:41:20 +0000 (-0700) Subject: libc++: avoid hash re-definitions X-Git-Tag: v0.78~285^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1fcbddc846476f9497dcec2bc667a50e426311a0;p=ceph.git 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 --- diff --git a/src/include/types.h b/src/include/types.h index 8467c80f3751..974edee02fd9 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