Date: Mon, 01 Jun 2026 05:39:02 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 295767] The C++ feature std::from_chars (with float value) is missing Message-ID: <bug-295767-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295767 Bug ID: 295767 Summary: The C++ feature std::from_chars (with float value) is missing Product: Base System Version: 15.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: yuri@freebsd.org Attachment #271391 text/plain mime type: Created attachment 271391 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=271391&action=edit from_chars.cpp The attached from_chars.cpp program fails to compile: > $ c++ -std=c++23 from_chars.cpp > from_chars.cpp:13:20: error: call to deleted function 'from_chars' > 13 | auto [ptr, ec] = std::from_chars(str.data(), str.data() + str.size(), value); > | ^~~~~~~~~~~~~~~ > /usr/include/c++/v1/__charconv/from_chars_integral.h:38:19: note: candidate function has been explicitly deleted > 38 | from_chars_result from_chars(const char*, const char*, bool, int = 10) = delete; > | ^ > /usr/include/c++/v1/__charconv/from_chars_integral.h:224:1: note: candidate template ignored: requirement 'is_integral<float>::value' was not satisfied [with _Tp = float] > 224 | from_chars(const char* __first, const char* __last, _Tp& __value) { > | ^ > /usr/include/c++/v1/__charconv/from_chars_integral.h:230:1: note: candidate function template not viable: requires 4 arguments, but 3 were provided > 230 | from_chars(const char* __first, const char* __last, _Tp& __value, int __base) { > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. despite the C++ standard saying that it should exist from c++17: https://en.cppreference.com/cpp/utility/from_chars -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-295767-227>
