diff --git a/include/fmt/format.h b/include/fmt/format.h index ae39824c..52d1be8e 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4089,7 +4089,7 @@ class format_int { }() /** - * Constructs a compile-time format string from a string literal `s`. + * Constructs a legacy compile-time format string from a string literal `s`. * * **Example**: * @@ -4209,8 +4209,7 @@ FMT_NODISCARD auto to_string(T value) -> std::string { // The buffer should be large enough to store the number including the sign // or "false" for bool. char buffer[max_of(detail::digits10() + 2, 5)]; - char* begin = buffer; - return {buffer, detail::write(begin, value)}; + return {buffer, detail::write(buffer, value)}; } template ::value)>