]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
libc++: avoid hash re-definitions
authorNoah Watkins <noahwatkins@gmail.com>
Tue, 29 Oct 2013 20:41:20 +0000 (13:41 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Sat, 18 Jan 2014 22:03:58 +0000 (14:03 -0800)
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 <noahwatkins@gmail.com>
src/include/types.h

index 8467c80f37510d2bebd920bbfd9661b5b6381ce8..974edee02fd9fa20ad1790e6b31c7dd2cc95d02f 100644 (file)
@@ -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<const char*> H;
-      return H(x.c_str());
-    }
-  };
-
-#ifndef __LP64__
-  template<> struct hash<int64_t> {
-    size_t operator()(int64_t __x) const { 
-      static hash<int32_t> H;
-      return H((__x >> 32) ^ (__x & 0xffffffff)); 
-    }
-  };
-  template<> struct hash<uint64_t> {
-    size_t operator()(uint64_t __x) const { 
-      static hash<uint32_t> H;
-      return H((__x >> 32) ^ (__x & 0xffffffff)); 
-    }
-  };
-#endif
-CEPH_HASH_NAMESPACE_END
-
-
-
 // -- io helpers --
 
 template<class A, class B>