# operator==,!=,<,<=,>,>=,<=>(std::reverse_iterator)

< cpp‎ | iterator‎ | reverse iterator

| (1) |
template< class Iterator1, class Iterator2 > bool operator==( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 前)
template< class Iterator1, class Iterator2 > constexpr bool operator==( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 起)
| (2) |
template< class Iterator1, class Iterator2 > bool operator!=( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 前)
template< class Iterator1, class Iterator2 > constexpr bool operator!=( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 起)
| (3) |
template< class Iterator1, class Iterator2 > bool operator<( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 前)
template< class Iterator1, class Iterator2 > constexpr bool operator<( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 起)
| (4) |
template< class Iterator1, class Iterator2 > bool operator<=( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 前)
template< class Iterator1, class Iterator2 > constexpr bool operator<=( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 起)
| (5) |
template< class Iterator1, class Iterator2 > bool operator>( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 前)
template< class Iterator1, class Iterator2 > constexpr bool operator>( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 起)
| (6) |
template< class Iterator1, class Iterator2 > bool operator>=( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 前)
template< class Iterator1, class Iterator2 > constexpr bool operator>=( const std::reverse_iterator<Iterator1>& lhs, const std::reverse_iterator<Iterator2>& rhs ); |  | (C++17 起)
template<class Iterator1, std::three_way_comparable_with<Iterator1> Iterator2> constexpr std::compare_three_way_result_t<Iterator1, Iterator2> operator<=>( const std::reverse_iterator<Iterator1>& x, const std::reverse_iterator<Iterator2>& y ); | (7) | (C++20 起)

比较底层迭代器。考虑到迭代器顺序是逆向的，而应用逆向比较。

(1-6) 仅若其底层比较表达式（见后述）为良构且可转换为 bool 才参与重载决议。 `!=` 运算符从 `operator==` 合成。 | (C++20 起)

### 参数

lhs, rhs | - | 要比较的迭代器适配器

### 返回值

1) lhs.base() == rhs.base()
2) lhs.base() != rhs.base()
3) lhs.base() > rhs.base()
4) lhs.base() >= rhs.base()
5) lhs.base() < rhs.base()
6) lhs.base() <= rhs.base()
7) rhs.base() <=> lhs.base()

### 示例

| 本节未完成 原因：暂无示例