[libcxx-commits] [PATCH] D59178: [libc++] Speedup to_string and to_wstring for integers using stack buffer and SSO
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 26 10:22:30 PDT 2019
mclow.lists added inline comments.
================
Comment at: libcxx/src/string.cpp:443
+ const auto res = __to_chars_itoa(buf, buf + bufsize, v, is_signed<V>());
+ if (res.ec == errc())
+ return S(buf, res.ptr);
----------------
I wouldn't do this at all.
I would just `_LIBCPP_ASSERT` that it succeeded.
Thus getting rid of all the `sprintf_like` infrastructure.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59178/new/
https://reviews.llvm.org/D59178
More information about the libcxx-commits
mailing list