From a9ecfb1b8295e06d625037b0faa1e3985113b43c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 24 Feb 2018 11:31:47 +0800 Subject: [PATCH] common/lockdep: drop hash specialization quote from http://en.cppreference.com/w/cpp/utility/hash: > Each standard library header that declares the template std::hash > provides enabled specializations of std::hash for std::nullptr > and all cv-unqualified arithmetic types (including any extended > integer types), all enumeration types, and all pointer types. since we've switched to C++17. this full specialization is not necessary anymore. Signed-off-by: Kefu Chai --- src/common/lockdep.cc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc index 9b00dcd6e3a..cf0aba6dd4f 100644 --- a/src/common/lockdep.cc +++ b/src/common/lockdep.cc @@ -15,18 +15,6 @@ #include "common/dout.h" #include "common/valgrind.h" -#if defined(__FreeBSD__) && defined(__LP64__) // On FreeBSD pthread_t is a pointer. -namespace std { - template<> - struct hash - { - size_t - operator()(pthread_t __x) const - { return (uintptr_t)__x; } - }; -} // namespace std -#endif - /******* Constants **********/ #define lockdep_dout(v) lsubdout(g_lockdep_ceph_ctx, lockdep, v) #define MAX_LOCKS 4096 // increase me as needed