llvm-project/libcxx/test/std/algorithms/alg.modifying.operations
Arthur O'Dwyer d41c6d51cb [libc++] Rationalize our treatment of contiguous iterators and __unwrap_iter().
- Implement C++20's changes to `reverse_iterator`, so that it won't be
    accidentally counted as a contiguous iterator in C++20 mode.
- Implement C++20's changes to `move_iterator` as well.
- `move_iterator` should not be contiguous. This fixes a bug where
    we optimized `std::copy`-of-move-iterators in an observable way.
    Add a regression test for that bugfix.
- Add libcxx tests for `__is_cpp17_contiguous_iterator` of all relevant
    standard iterator types. Particularly check that vector::iterator
    is still considered contiguous in all C++ modes, even C++03.

After this patch, there continues to be no supported way to write your
own iterator type in C++17-and-earlier such that libc++ will consider it
"contiguous"; however, we now fully support the C++20 approach (in C++20
mode only). If you want user-defined contiguous iterators in C++17-and-earlier,
libc++'s position is "please upgrade to C++20."

Differential Revision: https://reviews.llvm.org/D94807
2021-02-03 16:28:38 -05:00
..
alg.copy [libc++] Remove _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED. 2020-11-24 11:04:21 -05:00
alg.fill libcxx: Rename .hpp files in libcxx/test/support to .h 2019-08-21 00:14:12 +00:00
alg.generate libcxx: Rename .hpp files in libcxx/test/support to .h 2019-08-21 00:14:12 +00:00
alg.move [libc++] Rationalize our treatment of contiguous iterators and __unwrap_iter(). 2021-02-03 16:28:38 -05:00
alg.partitions [libc++] [P0879] constexpr std::reverse, partition, *_permutation. 2021-01-25 13:09:30 -05:00
alg.random.sample [libc++] Mark some tests as unsupported on GCC 5 2020-07-08 12:02:36 -04:00
alg.random.shuffle [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
alg.remove [libcxx] [test] Add casts to avoid signed/unsigned mismatch warnings on MSVC++ 2020-01-14 01:11:10 -08:00
alg.replace Support tests in freestanding 2019-02-04 20:31:13 +00:00
alg.reverse [libc++] [P0879] constexpr std::reverse, partition, *_permutation. 2021-01-25 13:09:30 -05:00
alg.rotate [libc++][test] Spell "TEST_CONSTEXPR_CXX17" correctly 2020-10-19 17:11:26 -07:00
alg.shift [libc++] Implement [P0769] "Add shift to algorithm" (shift_left, shift_right) 2021-01-25 12:57:04 -05:00
alg.swap This patch makes swap functions constexpr. Both swap overloads, swap_ranges and iter_swap are updated (with tests). 2019-07-05 20:13:34 +00:00
alg.transform Support tests in freestanding 2019-02-04 20:31:13 +00:00
alg.unique Support tests in freestanding 2019-02-04 20:31:13 +00:00