<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91268>91268</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++] Libc++ implements `std::from_chars` with default argument as one more overload, is it allowed?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
SainoNamkho
</td>
</tr>
</table>
<pre>
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))
>);
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVEFv4zYT_TXjyyAGNbRk-aCDk6yAD1_aS3-AQZEji11KNEjKifvrC8pO4t0NCvRWgLAxI85w-PjeUzHa48TcQPkI5fNKzWnwoflD2cn_rsbvg1913lyaIaVTBLkHaoFaZre2EajVQI9AjyaoPuVwUEH76Qwk--DHdY7jQ4FRXTANjPkslebAGAc_O4Mdg3gGsYdKXNet4TWr_RQTv50C5m6HpdshcJxdussA1ctGzBHQHnsbYgJ6wh_TTi3Za2u0U-Ijh4d0OTFQhWflZs5FdkrYqcgI8hkLAbQD-fjTlNfwcU5oI9rx5HjkKbFBFa-ffoTraNMwd2vtR6DWufP738Mp-D9ZZ-Q65zugtte93BRGGtMzUb1Tuq6Vkrog6qg0fb2VpHXNuYHt9NsbUGsn7WaTU4fD5wO0d5Atdw3KrQcg-UJEDy8k5e1Oy-__gLYjTj69P4zt84MFBtpGVNMFHR-Vw1d1iZg82imeWCdMg41r3E_vBdh75_yrnY6oveEMzys799D7MLJZ4E1oPEcc1XdGhcb2PQeeNK-_RM6bzru09uEI1P4F1J5V8VsX_l_V_0QcIHlDBUE-fYAiv93fOSaVrD6oGDkkoDomk8-VexsPUY18OIN8Z4th7a5MqW9lOrNJPn0U_cJQoBpon-nzEz9_YeaNdUDVQrZv97Pc03y3rP_eSNd5EHHZ-IVcVqaRZid3asVNsS1KQXW52a2GRhRGyJ6507zdCl2UUpakjOgKXfdKqJVtSNBGlKIisdmJ3bpWXG257E1dV92mr2AjeFTWrbOeMk1WNsaZm11BVb1yqmMXF28jyoK5kYQoe11oFhF28zHCRjgbU_xsk2xyiyvelZXP-PIRfeo-IlTiK3gqga82DWi4V9mzVDjOuQBVRD8xjj4w-jMH59VVHDHrQ2UJsQHZrubgmn_tJQsC2Z0XEP4OAAD__x-F1B4">