[libcxx-commits] [PATCH] D97705: [RFC][libc++] Improve std::to_chars for base != 10.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 21 08:53:17 PST 2022
Mordante added a comment.
In D97705#2689772 <https://reviews.llvm.org/D97705#2689772>, @ldionne wrote:
> I think it would make sense to have a general implementation that works for all bases, and then have a few common bases (likely 2, 8, 10, 16 as you say) be compiled in the library. I think the top-level could look something like:
I think moving code to the library will only be temporary. It seems the direction is to make these functions `constexpr` in C++23. https://wg21.link/p2291r3
================
Comment at: libcxx/include/charconv:550
return __to_chars_itoa(__first, __last, __value, false_type());
-
+#if 1
+ switch (__base) {
----------------
Run 1 -> `#if 0`
Run 2 -> `#if 1`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97705/new/
https://reviews.llvm.org/D97705
More information about the libcxx-commits
mailing list