diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index bd248b03..d9faf56b 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -843,7 +843,7 @@ table:empty_value,empty_value,empty_value using size_policy=pow2_size_policy; using prober=pow2_quadratic_prober; using mix_policy=typename std::conditional< - hash_traits::is_avalanching::value, + hash_is_avalanching::value, no_mix, xmx_mix >::type; diff --git a/include/boost/unordered/hash_traits.hpp b/include/boost/unordered/hash_traits.hpp index 9409c02b..5f501566 100644 --- a/include/boost/unordered/hash_traits.hpp +++ b/include/boost/unordered/hash_traits.hpp @@ -20,31 +20,28 @@ namespace unordered{ namespace detail{ template -struct hash_is_avalanching +struct hash_is_avalanching_impl { using type=std::false_type; }; template -struct hash_is_avalanching> +struct hash_is_avalanching_impl> { using type=std::true_type; }; } /* namespace detail */ -/* Partially specializable by users for concrete hash functions when - * actual characterization differs from default. +/* Each trait can be partially specialized by users for concrete hash functions + * when actual characterization differs from default. */ +/* Derived from std::true_type if the type Hash::is_avalanching is present, + * derived from std::false_type otherwise. + */ template -struct hash_traits -{ - /* std::true_type if the type Hash::is_avalanching is present, - * std::false_type otherwise. - */ - using is_avalanching=typename detail::hash_is_avalanching::type; -}; +struct hash_is_avalanching:detail::hash_is_avalanching_impl::type{}; } /* namespace unordered */ } /* namespace boost */