diff --git a/include/fmt/format.h b/include/fmt/format.h index 57062792..b13bc4cf 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1234,7 +1234,7 @@ FMT_CONSTEXPR20 auto do_format_decimal(Char* out, UInt value, int size) unsigned n = to_unsigned(size); while (value >= 100) { n -= 2; - if (!is_constant_evaluated() && sizeof(UInt) == 4) { + if (!is_constant_evaluated() && num_bits() == 32) { auto p = value * static_cast((1ull << 39) / 100 + 1); write2digits_i(out + n, p >> (39 - 7) & ((1 << 7) - 1)); value = static_cast(p >> 39) +