<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/139464>139464</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            `copy_if` test seem to violate the precondition
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          AlexGuteniev
      </td>
    </tr>
</table>

<pre>
    [alg.copy]/16:
> Preconditions: The ranges [first, last) and [result, result + (last - first)) do not overlap.

The following test do not have this precondition satisfied, as it doesn't even have  _[result, result + (last - first))_ range:

https://github.com/llvm/llvm-project/blob/79210feb2993ff9a79ef11f8a7016a527d4fcf22/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp#L160-L162

The following tests seem to be also affected by similar issue:
 * std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
 * std/algorithms/alg.modifying.operations/alg.unique/unique_copy.pass.cpp
 * std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVLFypDgQ_RqRdJmSGsRYAcH4fFzi4ILLpwS0QFcaxCKBPX-_pQGvdwMH3tpIEq1-_dSvHzoEO0xENZNPTD5neo2jX-qzo7d_1kiTpS1rfX9Lce2GvPPzjclnho2oWHFm_MyKv-HfhTo_9TZaPwVWnOG_kWDR00ABmHwydgmR4V_gdFoV6KlP3xcKq7sH9h0wfAKGj-kaPMCRplJG72HyEfxGi9Nznuryc6pivHP-1U4DRArx_d6oN4I42gDzT9Qg6GiDsdSnmjqATQkUJoanCLTRtCfC5UvkLvtTj3bw8xjjnLrAsGHYDDaOa5t3_sqwcW57Xx7mxf9PXWTYtM63DJuTQsENtahUYYzSJ0VGCPOoT1xUWuKpL01nEBOAbbu3N4ZNejTDJsSeYaPd4Bcbx2vYD_nV99bc7DTkfqZF7_LsobuQ2Owi3U8Xa_JZh5B388yweBEVf3gRFX7W6wCB6ArRQ0ugXfCgjaEuUg_tDYK9WqcXsCGsR2uA4Rm-znShq9_oB9fLfr4kyh98fxt9ney3NaHvmz8Oe5D-BD3r66JXhdIZ1eJUVkphVfJsrEl0kipjZC-l4W0h5UmIVmoj0fSlqDJbI0fJpRBClSXnuWl7qVTZmYLLoi2JlZyu2ro8DVvulyG7S1GLQpVVmTndkgt32yNO9HoIhZj-Akt9n9B2HQIrubMhhg-YaKOjmlX8GBpW8d177-OwWe90TP6jX-yXrYurv2yOO6_U1oP4VuP3AAAA__-B9o-3">