https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146

            Bug ID: 100146
           Summary: __cpp_lib_to_chars not defined
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
  Target Milestone: ---

Hi gcc-team,

it seems that you implemented the float variants of <charconv> in gcc-11.

Is there a reason that you did not define `__cpp_lib_to_chars`?

The following code:

```cpp
#include <version>

#ifndef __cpp_lib_to_chars
#warning("__cpp_lib_to_chars NOT defined")
#endif

#include <charconv>

#ifndef __cpp_lib_to_chars
#warning("__cpp_lib_to_chars NOT defined")
#endif

#include <string_view>

int main()
{
    float value;
    std::string_view view{"5.55"};

    std::from_chars(view.begin(), view.end(), value);
}
```

throws warnings.

https://godbolt.org/z/WK7qs84Th

Thank you!

Reply via email to