[libcxx-commits] [libcxx] WIP - [libc++][string] P2587R3: `to_string` or not `to_string` (PR #78100)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 16 12:17:04 PDT 2025
================
@@ -3939,9 +3939,22 @@ _LIBCPP_EXPORTED_FROM_ABI string to_string(long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(long long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned long long __val);
+
+# if _LIBCPP_STD_VER >= 26
+inline namespace __cpp26 {
+_LIBCPP_EXPORTED_FROM_ABI string __to_string(float __val);
+_LIBCPP_EXPORTED_FROM_ABI string __to_string(double __val);
+_LIBCPP_EXPORTED_FROM_ABI string __to_string(long double __val);
+
+inline _LIBCPP_HIDE_FROM_ABI string to_string(float __val) { return std::__to_string(__val); }
----------------
mordante wrote:
Since it seems it may take quite a while before `to_chars` will be done I don't think we need to spend time now to fix the CI, this will be outdated once we can pursue this patch.
That is unless somebody else volunteers to implement `to_chars` long double. It is on my TODO list, but not at a high priority. Realistically I don't expect to work on it this year.
https://github.com/llvm/llvm-project/pull/78100
More information about the libcxx-commits
mailing list