function template
<iterator>

std::relational operators (move_iterator)

(1)
template <class Iterator1, class Iterator2>
  bool operator== (const move_iterator<Iterator1>& lhs,
                   const move_iterator<Iterator2>& rhs);
(2)
template <class Iterator1, class Iterator2>
  bool operator!= (const move_iterator<Iterator1>& lhs,
                   const move_iterator<Iterator2>& rhs);
(3)
template <class Iterator1, class Iterator2>
  bool operator<  (const move_iterator<Iterator1>& lhs,
                   const move_iterator<Iterator2>& rhs);
(4)
template <class Iterator1, class Iterator2>
  bool operator<= (const move_iterator<Iterator1>& lhs,
                   const move_iterator<Iterator2>& rhs);
(5)
template <class Iterator1, class Iterator2>
  bool operator>  (const move_iterator<Iterator1>& lhs,
                   const move_iterator<Iterator2>& rhs);
(6)
template <class Iterator1, class Iterator2>
  bool operator>= (const move_iterator<Iterator1>& lhs,
                   const move_iterator<Iterator2>& rhs);
Relational operators for move_iterator
Performs the appropriate comparison operation between the movee_iterator objects lhs and rhs.

Internally, the function compares directly the base iterators using the following equivalent relational operator:

operator on
move iterators
equivalent used on
base iterators
ma == mb ba == bb
ma != mb!(ba == bb)
ma < mb ba < bb
ma <= mb!(bb < ba)
ma > mb bb < ba
ma >= mb!(ba < bb)

These operators are overloaded in header <iterator>.

Parameters

lhs, rhs
move_iterator objects (to the left- and right-hand side of the operator, respectively) for whose base iterators the proper comparison operation is defined.

Return Value

true if the condition holds, and false otherwise.

Data races

Both objects, lhs and rhs, are accessed.

Exception safety

Provides the same level of guarantee as the operation applied to the base iterators of lhs and rhs.

See also