mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
dropped hash_traits in favor of individual traits
This commit is contained in:
@ -843,7 +843,7 @@ table:empty_value<Hash,0>,empty_value<Pred,1>,empty_value<Allocator,1>
|
||||
using size_policy=pow2_size_policy;
|
||||
using prober=pow2_quadratic_prober;
|
||||
using mix_policy=typename std::conditional<
|
||||
hash_traits<Hash>::is_avalanching::value,
|
||||
hash_is_avalanching<Hash>::value,
|
||||
no_mix,
|
||||
xmx_mix
|
||||
>::type;
|
||||
|
@ -20,31 +20,28 @@ namespace unordered{
|
||||
namespace detail{
|
||||
|
||||
template<typename Hash,typename=void>
|
||||
struct hash_is_avalanching
|
||||
struct hash_is_avalanching_impl
|
||||
{
|
||||
using type=std::false_type;
|
||||
};
|
||||
|
||||
template<typename Hash>
|
||||
struct hash_is_avalanching<Hash,void_t<typename Hash::is_avalanching>>
|
||||
struct hash_is_avalanching_impl<Hash,void_t<typename Hash::is_avalanching>>
|
||||
{
|
||||
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<typename Hash>
|
||||
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<Hash>::type;
|
||||
};
|
||||
struct hash_is_avalanching:detail::hash_is_avalanching_impl<Hash>::type{};
|
||||
|
||||
} /* namespace unordered */
|
||||
} /* namespace boost */
|
||||
|
Reference in New Issue
Block a user