[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
Loading
Please sign in to comment