From e956a14e9e0f995c5c956cf12f689209be71e234 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 13 Jun 2020 20:07:08 -0700 Subject: [PATCH] Use write instead of format_int in to_string --- include/fmt/format.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } /**