[libcxx] Implement three-way comparison for std::reverse_iterator
authorMikhail Maltsev <mikhail.maltsev@arm.com>
Fri, 26 Nov 2021 10:12:19 +0000 (10:12 +0000)
committerMikhail Maltsev <mikhail.maltsev@arm.com>
Fri, 26 Nov 2021 10:12:19 +0000 (10:12 +0000)
commitd8f3cdfed03fe73c152d7fbf509f34f4b502f384
treeeb4078d5009d0fa545a02fce52bd1b894a2c878e
parentd026f2f7c688b326eae429286a06bf4080c8b527
[libcxx] Implement three-way comparison for std::reverse_iterator

This patch implements operator<=> for std::reverse_iterator and
also adds a test that checks that three-way comparison of different
instantiations of std::reverse_iterator works as expected (related to
D113417).

Reviewed By: ldionne, Quuxplusone, #libc

Differential Revision: https://reviews.llvm.org/D113695
libcxx/include/__iterator/reverse_iterator.h
libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/three-way.pass.cpp [new file with mode: 0644]