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: [email protected]
Reporter: [email protected]
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.