Update SFINAE to handle the case of the init_type and moved_type being the same

This commit is contained in:
Christian Mazakas
2022-10-06 10:45:49 -07:00
parent f1eb5d2106
commit 6b1379a992

View File

@ -1229,22 +1229,13 @@ private:
}
template<
bool dependent_value=false,
class T,
typename std::enable_if<
has_different_init_type||dependent_value>::type* =nullptr
has_different_init_type&&(
std::is_same<T,init_type>::value||std::is_same<T,moved_type>::value
)>::type* =nullptr
>
static inline auto key_from(const init_type& x)
->decltype(type_policy::extract(x))
{
return type_policy::extract(x);
}
template<
bool dependent_value=false,
typename std::enable_if<
has_different_init_type||dependent_value>::type* =nullptr
>
static inline auto key_from(const moved_type& x)
static inline auto key_from(const T& x)
->decltype(type_policy::extract(x))
{
return type_policy::extract(x);