<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/116502>116502</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libcxx]: `string::__insert_with_size` misses `std::move`
</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>
https://github.com/llvm/llvm-project/blob/935d753c6dca0cd9bc5ea14fde5b00386ebcc5be/libcxx/include/string#L3085
testcase:
```cpp
#include <sstream>
#include <string>
#include <ranges>
int main() {
auto is = std::istringstream{"a b c d"};
auto chars = std::views::istream<int>(is);
std::string s;
s.insert_range(s.begin(), std::views::counted(chars.begin(), 3));
}
```
https://godbolt.org/z/Eh4EP8avE
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8uO2zAM_Br6YjSQSMuPgw_JJj710D8IJFmx1Tp2YMrZ7X594Uc27WIvBQQI0YTDGXqomX3TO1eCOoA6RnoK7TCWrXv1XfcrMkP9u2xDuDHQHrACrBof2sns7HAFrLru_ri-3cbhp7MBsDLdYACrglSdKbJpbbWwdWGscloml9opIwTlqTPWKuNmAm_s2xtg5XvbTfX8xGH0fQNI30nkCsQRxD44Dlazm8UsD5CK9djbbXtB2jhioBfmMDp9BTp9ia4tvgZH3TeOP8B4vXwf4qv2PWAOWMSQHTZYT2GIPcdAx5hDPSukvV87bCKyAyDq2MQ2rgERsiPQo3ytt60eP1HcvXvlJ9ti5sX3YRaGuWfA4i-Wj7K1ccxPjHe-ZzeG82IMMOedcc3DCeDLlz3tMPXB1YD5ou1zCS33U8Hs6d8Ps_78FKGhNkMXdsPYAFbvgNWpTU4_cn0_RXVJdUGFjlwpM5JZTjKhqC2doITMpXAmt6nJSRQpXlRBsqDskqg08iUKTKSUqcwVIu1EnUuJRqVpIS9pTpAId9W-281pnXtHnnlypZSpEhh12riOlz1AnPMIeFgOznsxlkvGzdQwJKLzHPjJE3zolg3aYqyOQPsYUvEI2DzJ83mb_6sP7Zn9u4NUxFfP7Hj97zb963CfoWgau_9fvcUSA1abq3uJfwIAAP__GLMlbg">