diff --git a/include/fmt/format.h b/include/fmt/format.h index 05247744..8368b5d2 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3380,7 +3380,10 @@ inline std::string to_string(const T& value) { } template ::value)> inline std::string to_string(T value) { - return format_int(value).str(); + char buffer[detail::digits10() + 2]; + char* begin = buffer; + char* end = detail::write(begin, value); + return std::string(begin, end); } /**