diff --git a/include/fmt/core.h b/include/fmt/core.h index 22d0aab1..2dd10f96 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2218,7 +2218,7 @@ FMT_CONSTEXPR inline auto code_point_length_impl(char c) -> int { // This is useful because it allows the compiler to check that the // length is within the range [1, 4] FMT_CONSTEXPR inline auto code_point_length_impl_2(char c) -> int { - return ((0x3a55000000000000ull >> (2 * (static_cast(c) >> 3))) & 0x3) + 1; + return static_cast((0x3a55000000000000ull >> (2 * (static_cast(c) >> 3))) & 0x3) + 1; } template