Issue |
91268
|
Summary |
[libc++] Libc++ implements `std::from_chars` with default argument as one more overload, is it allowed?
|
Labels |
libc++
|
Assignees |
|
Reporter |
SainoNamkho
|
https://eel.is/c++draft/charconv#from.chars-1 say the signature should be
```c++
constexpr from_chars_result from_chars(const char* first, const char* last,
integer-type& value, int base = 10);
```
But is implemented as
https://github.com/llvm/llvm-project/blob/fcf341d3ddfe2289ac88aa3c122b25df8732cc8e/libcxx/include/__charconv/from_chars_integral.h#L222-L233
I'm not should if there's any legal ways to inspect this. And if the following code is well-formed, it does make a difference.
https://godbolt.org/z/va1MbrK68
```c++
#include <charconv>
static_assert(std::is_same_v<
decltype(static_cast<std::from_chars_result(*)(const char*, const char*, int&)>(std::from_chars)),
decltype(static_cast<std::from_chars_result(*)(const char*, const char*, int&)>(std::from_chars))
>);
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs