forked from boostorg/unordered
Add a BOOST_ASSERT to mix64_policy to check that the bucket_count is a power of two
This commit is contained in:
@ -2018,6 +2018,7 @@ namespace boost {
|
||||
|
||||
static inline SizeT to_bucket(SizeT bucket_count, SizeT hash)
|
||||
{
|
||||
BOOST_ASSERT( boost::core::has_single_bit( bucket_count ) );
|
||||
return hash & (bucket_count - 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user