llvm-project/libcxx/include/__iterator
Mikhail Maltsev 6938270fa6 [libcxx] Fix enable_if condition of std::reverse_iterator::operator=
The template std::is_assignable<T, U> checks that T is assignable from
U. Hence, the order of operands in the instantiation of
std::is_assignable in the std::reverse_iterator::operator= condition
should be reversed.

This issue remained unnoticed because std::reverse_iterator has an
implicit conversion constructor. This patch adds a test to check that
the assignment operator is used directly, without any implicit
conversions. The patch also adds a similar test for
std::move_iterator.

Reviewed By: Quuxplusone, ldionne, #libc

Differential Revision: https://reviews.llvm.org/D113417
2021-11-15 13:08:36 +00: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 [NFC][libc++] Update back_insert_iterator style. 2021-10-09 13:31:20 +02: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 [libcxx] Fix enable_if condition of std::reverse_iterator::operator= 2021-11-15 13:08:36 +00: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++] Use addressof in vector. 2021-10-21 17:28:17 +02:00