<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/135472>135472</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++] Cannot construct `string` from `volatile` char array
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hewillk
</td>
</tr>
</table>
<pre>
As far as I know, both of the following should be well-formed.
However, libc++ seems to always expect the char array not to be `volatile`, which causes a hard error in function body.
```
#include <string>
volatile char vs[42] = {};
std::string s1(std::begin(vs), std::end(vs));
std::string s2(std::from_range, vs);
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0UmGP2yAM_TXOF-sqAqS5fMiH9rpq-xUTECdhR-EEJNn9-4m2u1aTJllCMn7PfvZTKdnJE_XQHKE5VWrJc4j9TJt17r3SYfjsDwlHFVEl_IHvPmzA31CHPGMYMc-EY3AubNZPmOawuAE14UbOvYwhXmjYATt8DxutFAvSWW2AH4EfMRFdEuaAym3qMyH9_iCTr5xmLh1jVJ_oQy41mhD2bA1OZesI9qyQbbM1Mxq1JEqocFZxQIoxRLQex8WbbIPHoqJMUWLP7sEOwIX1xi0DIYi3lKP1E4hvt8K_jW6TrAmao-TQnBDECaE9QnsCcQR2SHkAcQBxuBFgqoG_fiU1TdYDf10T8K5M_PVDfnjku_9w8WeuMYbLz6j8RIXohrzCnkVVQy-GTnSqor5upZS8k6-smnshiKlaN3VXD6we9l09SkG81XropGl1ZXvOeMNkzZmQUrJd00o2NryWnVKmqxVIRhdl3c659bILcapsSgv1tWhkyyunNLl0NRLnjysDL2urYl9QL3qZEkjmbMrpwZNtdlcLPsGaE74pX45vgk85LiYXA9zPtGdY1vGPJZ5sUy3R9XPOH6ksj5-Bnyeb50XvTLgAP5fe9-flI4ZfZDLw81VQAn6-a1p7_icAAP__GM32tQ">