Remove extraneous overloads of key_from

This commit is contained in:
Christian Mazakas
2022-10-06 12:04:21 -07:00
parent 2b7e9d826d
commit dc7b8f3ff2

View File

@ -1264,32 +1264,13 @@ private:
}
template<
typename T,
typename std::enable_if<
has_different_init_type&&
is_init_or_value_type<T>::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<!is_init_or_value_type<Key>::value>::type* =nullptr
>
static inline const Key& key_from(const Key& x)
{
return x;
}
template<typename Arg1,typename Arg2>
static inline auto key_from(
std::piecewise_construct_t,const Arg1& k,const Arg2&)