Louis Dionne f73050e722
[libc++] Fix several double-moves in the code base (#104616)
This patch hardens the "test iterators" we use to test algorithms by
ensuring that they don't get double-moved. As a result of this
hardening, the tests started reporting multiple failures where we would
double-move iterators, which are being fixed in this patch.

In particular:
- Fixed a double-move in pstl.partition
- Add coverage for begin()/end() in subrange tests
- Fix tests for ranges::ends_with and ranges::contains, which were
  incorrectly calling begin() twice on the same subrange containing
  non-copyable input iterators.

Fixes #100709
2024-08-20 14:36:11 -04:00
..