diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index a7bb863c..2de4c9a8 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -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); }