diff --git a/absl/numeric/bits.h b/absl/numeric/bits.h index 628cdf50..df81b9a9 100644 --- a/absl/numeric/bits.h +++ b/absl/numeric/bits.h @@ -131,10 +131,9 @@ has_single_bit(T x) noexcept { // fractional part discarded. template ABSL_INTERNAL_CONSTEXPR_CLZ inline - typename std::enable_if::value, T>::type + typename std::enable_if::value, int>::type bit_width(T x) noexcept { - return std::numeric_limits::digits - - static_cast(countl_zero(x)); + return std::numeric_limits::digits - countl_zero(x); } // Returns: If x == 0, 0; otherwise the maximal value y such that