Commit e956a14e authored by Victor Zverovich's avatar Victor Zverovich

Use write instead of format_int in to_string

parent 98dcc251
...@@ -3380,7 +3380,10 @@ inline std::string to_string(const T& value) { ...@@ -3380,7 +3380,10 @@ inline std::string to_string(const T& value) {
} }
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)> template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
inline std::string to_string(T value) { inline std::string to_string(T value) {
return format_int(value).str(); char buffer[detail::digits10<T>() + 2];
char* begin = buffer;
char* end = detail::write<char>(begin, value);
return std::string(begin, end);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment