operators (std::reverse_iterator)
运算符<,<=,>=%28std::反向[医]迭代器%29
| (1) | |
---|---|---|
template< class Iterator1, class Iterator2 > bool operator==( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (until C++17) | |
template< class Iterator1, class Iterator2 > constexpr bool operator==( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (since C++17) | |
| (2) | |
template< class Iterator1, class Iterator2 > bool operator!=( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (until C++17) | |
template< class Iterator1, class Iterator2 > constexpr bool operator!=( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (since C++17) | |
| (3) | |
template< class Iterator1, class Iterator2 > bool operator<( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (until C++17) | |
template< class Iterator1, class Iterator2 > constexpr bool operator<( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (since C++17) | |
| (4) | |
template< class Iterator1, class Iterator2 > bool operator<=( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (until C++17) | |
template< class Iterator1, class Iterator2 > constexpr bool operator<=( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (since C++17) | |
| (5) | |
template< class Iterator1, class Iterator2 > bool operator>( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (until C++17) | |
template< class Iterator1, class Iterator2 > constexpr bool operator>( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (since C++17) | |
| (6) | |
template< class Iterator1, class Iterator2 > bool operator>=( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (until C++17) | |
template< class Iterator1, class Iterator2 > constexpr bool operator>=( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs | (since C++17) |
比较基础迭代器。为了考虑迭代器顺序的反转,采用了逆比较。
参数
lhs, rhs | - | iterator adaptors to compare |
---|
返回值
1%29lhs.base() == rhs.base()
2%29lhs.base() != rhs.base()
3%29lhs.base() > rhs.base()
4%29lhs.base() >= rhs.base()
5%29lhs.base() < rhs.base()
6%29lhs.base() <= rhs.base()
例
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。