Skip to content

Commit c5bbc1e

Browse files
committed
Make function to be available in constant expressions
1 parent 5df3c66 commit c5bbc1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/slimcpplib/long_math.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ constexpr type_t popcnt_impl(type_t value) noexcept
317317
template<typename type_t, std::enable_if_t<is_unsigned_v<type_t>, int>>
318318
constexpr uint_t popcnt(type_t value) noexcept
319319
{
320-
return popcnt_impl<type_t>(value) & ((bit_count_v<type_t> << 2) - 1);
320+
return static_cast<uint_t>(popcnt_impl<type_t>(value) & ((bit_count_v<type_t> << 2) - 1));
321321
}
322322

323323

0 commit comments

Comments
 (0)