From dc7b8f3ff20daf0c2b601dbcdd88186741bf7cf3 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Thu, 6 Oct 2022 12:04:21 -0700 Subject: [PATCH] Remove extraneous overloads of key_from --- include/boost/unordered/detail/foa.hpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index 06eb2538..7bf192a5 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -1264,32 +1264,13 @@ private: } template< - typename T, - typename std::enable_if< - has_different_init_type&& - is_init_or_value_type::value>::type* =nullptr - > + typename T> static inline auto key_from(const T& x) ->decltype(type_policy::extract(x)) { return type_policy::extract(x); } - static inline auto key_from(const value_type& x) - ->decltype(type_policy::extract(x)) - { - return type_policy::extract(x); - } - - template< - typename Key, - typename std::enable_if::value>::type* =nullptr - > - static inline const Key& key_from(const Key& x) - { - return x; - } - template static inline auto key_from( std::piecewise_construct_t,const Arg1& k,const Arg2&)