llvm-project/libcxx/include/__memory
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
..
allocator_traits.h [libc++] NFCI: Refactor allocator_traits 2021-01-18 17:37:25 -05:00
base.h
pointer_traits.h [libc++] Rationalize our treatment of contiguous iterators and __unwrap_iter(). 2021-02-03 16:28:38 -05:00
utilities.h [libc++] Fix allocate_shared when used with an explicitly convertible allocator 2020-12-15 11:50:06 -05:00