llvm-project/libcxx/test/std/iterators
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
..
iterator.container [libc++] NFC: Fix several GCC warnings in the test suite 2020-10-30 12:48:05 -04:00
iterator.primitives [libc++] Use consistent declaration for main() in test 2020-12-15 17:34:06 -05:00
iterator.range [libc++] NFC: Move iterator.range tests into the right place 2020-10-16 08:35:34 -04:00
iterator.requirements [libc++] Remove useless nothing_to_do.pass.cpp tests 2020-04-03 13:48:34 -04:00
iterator.synopsis Support tests in freestanding 2019-02-04 20:31:13 +00:00
iterators.general [libc++] Remove useless nothing_to_do.pass.cpp tests 2020-04-03 13:48:34 -04:00
predef.iterators [libc++] Rationalize our treatment of contiguous iterators and __unwrap_iter(). 2021-02-03 16:28:38 -05:00
stream.iterators [libc++] Add a libc++ configuration that does not support localization 2020-10-27 14:56:30 -04:00