diff --git a/doc/intrusive.qbk b/doc/intrusive.qbk index 888c25b..5589df1 100644 --- a/doc/intrusive.qbk +++ b/doc/intrusive.qbk @@ -3886,6 +3886,14 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std [section:release_notes Release Notes] +[section:release_notes_boost_1_75_00 Boost 1.75 Release] + +* Fixed bugs: + * [@https://github.com/boostorg/intrusive/issues/52 GitHub #52: ['Invalid casting in BOOST_INTRUSIVE_BSR_INTRINSIC]] + +[endsect] + + [section:release_notes_boost_1_73_00 Boost 1.73 Release] * Fixed bugs: diff --git a/include/boost/intrusive/detail/math.hpp b/include/boost/intrusive/detail/math.hpp index 0748f1d..c13e745 100644 --- a/include/boost/intrusive/detail/math.hpp +++ b/include/boost/intrusive/detail/math.hpp @@ -76,8 +76,8 @@ namespace detail { inline std::size_t floor_log2 (std::size_t x) { unsigned long log2; - BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, (unsigned long)x ); - return log2; + BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, x ); + return static_cast(log2); } #undef BOOST_INTRUSIVE_BSR_INTRINSIC