diff --git a/include/fmt/format.h b/include/fmt/format.h index 91487cb3..a51f4eec 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1112,6 +1112,10 @@ Char* format_uint(Char* buffer, detail::fallback_uintptr n, int num_digits, template inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { + if (auto ptr = to_pointer(out, num_digits)) { + format_uint(ptr, value, num_digits, upper); + return out; + } // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). char buffer[num_bits() / BASE_BITS + 1]; format_uint(buffer, value, num_digits, upper);