llvm-project/libcxx/include/__iterator
Arthur O'Dwyer 85d4e29fd8 [libc++] Fix __wrap_iter to be a proper contiguous iterator.
Instead of overloading `__to_address`, let's specialize `pointer_traits`.
Function overloads need to be in scope at the point where they're called,
whereas template specializations do not. (User code can provide pointer_traits
specializations to be used by already-included library code, so obviously
`__wrap_iter` can do the same.)

`pointer_traits<__wrap_iter<It>>` cannot provide `pointer_to`, because
you generally cannot create a `__wrap_iter` without also knowing the
identity of the container into which you're trying to create an iterator.
I believe this is OK; contiguous iterators are required to provide
`to_address` but *not* necessarily `pointer_to`.

Differential Revision: https://reviews.llvm.org/D110198
2021-09-22 18:51:46 -04:00
..
access.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
advance.h [libc++][NFC] Rename _EnableIf to __enable_if_t for consistency 2021-09-08 15:20:58 -04:00
back_insert_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
common_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
concepts.h [libcxx] contiguous iterator concept: don't require pointer or complete element types 2021-09-01 08:32:41 -04:00
counted_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
data.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
default_sentinel.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
distance.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
empty.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
erase_if_container.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
front_insert_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
incrementable_traits.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
insert_iterator.h [libc++] Define insert_iterator::iter with ranges::iterator_t. 2021-09-02 16:15:53 -04:00
istream_iterator.h [libc++][NFC] Remove redundant friend declaration for operator== 2021-08-31 17:02:58 -04:00
istreambuf_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
iter_move.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
iter_swap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
iterator_traits.h [libc++][NFC] Rename _EnableIf to __enable_if_t for consistency 2021-09-08 15:20:58 -04:00
move_iterator.h [libc++][NFC] Rename _EnableIf to __enable_if_t for consistency 2021-09-08 15:20:58 -04:00
next.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
ostream_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
ostreambuf_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
prev.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
projected.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
readable_traits.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
reverse_access.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
reverse_iterator.h [libc++][NFC] Rename _EnableIf to __enable_if_t for consistency 2021-09-08 15:20:58 -04:00
size.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
unreachable_sentinel.h [libcxx][ranges] Add `unreachable_sentinel`. 2021-08-12 10:11:27 -07:00
wrap_iter.h [libc++] Fix __wrap_iter to be a proper contiguous iterator. 2021-09-22 18:51:46 -04:00