mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
Update SFINAE to handle the case of the init_type and moved_type being the same
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user