<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115727>115727</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libcxx]: `__uninitialized_allocator_copy` misses `std::move` before calling `__unwrap_range`
</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/4c4db3c943d686ff7c1fcf2dbc975e8462497efe/libcxx/include/__memory/uninitialized_algorithms.h#L585-L592
testcase:
```cpp
#include <sstream>
#include <vector>
#include <ranges>
int main() {
auto is = std::istringstream{"1 2 3 4"};
auto ints = std::views::istream<int>(is);
std::vector v(std::from_range, std::views::counted(ints.begin(), 3));
}
```
https://godbolt.org/z/rjWeqdPj1
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8uSmzAQ_JrhQq0LRrx04GCvw2kPueXo0gvQRiBHEt7H16eE8TrZ2hziUnmKGaanG_Uw7_UwK9VCeYDymLAljNa1o3rRxvxMuJVv7RjC2QPZA3aA3aDDuPCdsBNgZ8zlFh7Ozj4rEQA7biwH7ApRSE4ELYismqrva5H3okfJBa1L1RQVFrRWvYoAmovXV8BOz8IsMqZOp0lN1r0BdsusZx00M_pdyRMzg3U6jJPfjYDkqWzKh6eSImRHyPbX_6B8EMyryPqarrLrEefzlkGyDUuBPHofnGITkG9fVS9KBOv-UXRsHpT_KKbXoOeQTkzPgA0gTaE-bGW2BJtqnwI5pj7IyJDstQ9Oz8NGoj4AYp5iStICEKE-Arm1b_1z-IRw0erF38FWLY96DpEXNtoD0j9A7m2rsvQC2Hzkemen06oK8PHLCcIuc1AyAs_B77gabkJjB1njfVzk__clXB8_-cpKbk3YWTcAdu-AnXv-oX7J7895IlsiKaEsUW1ek5wQWtIsGVuS5aysUNVSYYOS5I2UVY-8pjWiFFWiW8ywyOOvJLTMdnlGRVYxThhpmoJTKDI1MW120cJxdqK9X1Sb52WNdWIYV8avy4EYTQp4WA_GZXHtany-DB6KzGgf_B0n6GDWtdq8XR6B7FOostPps5-NFSxYdxL2_AZVlk7ae-Xjux8ff7IXFUtc9dapVDBj9Dzc4F4cO283VmXJ4sz_7-wq2wN2m_JLi78DAAD__4_bPAo">