Add a BOOST_ASSERT to mix64_policy to check that the bucket_count is a power of two

This commit is contained in:
Peter Dimov
2022-01-18 20:52:05 +02:00
parent 7717ff01a1
commit 98494420c5

View File

@ -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);
}