Skip to content

Commit 189c99a

Browse files
committed
Fix ordering
1 parent f984e8a commit 189c99a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libc/src/__support/CPP/iterator.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ template <typename Iter> class reverse_iterator {
5252

5353
LIBC_INLINE friend constexpr bool operator<(const reverse_iterator &lhs,
5454
const reverse_iterator &rhs) {
55-
return lhs.base() < rhs.base();
55+
return lhs.base() > rhs.base();
5656
}
5757

5858
LIBC_INLINE friend constexpr bool operator<=(const reverse_iterator &lhs,
5959
const reverse_iterator &rhs) {
60-
return lhs.base() <= rhs.base();
60+
return lhs.base() >= rhs.base();
6161
}
6262

6363
LIBC_INLINE friend constexpr bool operator>(const reverse_iterator &lhs,
6464
const reverse_iterator &rhs) {
65-
return lhs.base() > rhs.base();
65+
return lhs.base() < rhs.base();
6666
}
6767

6868
LIBC_INLINE friend constexpr bool operator>=(const reverse_iterator &lhs,
6969
const reverse_iterator &rhs) {
70-
return lhs.base() >= rhs.base();
70+
return lhs.base() <= rhs.base();
7171
}
7272

7373
LIBC_INLINE constexpr iterator_type base() const { current; }

0 commit comments

Comments
 (0)