<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57190>57190</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`basic_string::substr()` passes the allocator to the newly created string
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
philnik777
</td>
</tr>
</table>
<pre>
libc++ is currently non-conforming in `basic_string::substr()`, because it returns `basic_string(*this, __pos, __n, __alloc())` while the standard says it should return `basic_string(*this, __pos, __n)`. See https://wg21.link/LWG3752.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVUk1v3CAQ_TX2BcWy8dqYA4c0UXLJLYceV4DHNg0LFgNZ7b8vpltFVS-tNNJ88mbeMMrPN2GN0hX9loUYJDqFAC7aG3HePWjvFh8uxq3EOFKNrZJo9BljyKGqf8yCSWW3olNFeS6o6BNRoGVCICaSADEFh389Pcof42bwqD-fd3833C8lrfX6jllgyXUzFkjcgGCUbpZhJihvePTAzSc731v9T6cDuCHvAGSLcceDD33Jcl1p11jjPrL99v21ZwNtahDdOLaM8r4b6ln0M--5rKOJFsS_LIbsEhGwUCj0ZPSBRF8CDq554zqAjJCJFZQ6BSv-HGw1cUuq0f6SHWs_f6uHPfgfoGN2DWKCTPFlYB1v600MXC3LBP2g1cJg4COXauTzcqKMtaMcaysVWBTVkE-Afh1DdqrhuTaCtpS2U8dafuqGUzPNtJs0Gzs-9gvVXXVq4SKNbY5BGh_WOogyk0or5qQ1GPErmZdgVgdQ-mV8meLmg9jz9zrzwRirCwNRxv8J4IbVBw">