Namespaces
Variants
Views
Actions

operator-(std::reverse_iterator)

From cppreference.com
template <class Iterator1, class Iterator2>

auto operator- (
  const reverse_iterator<Iterator1>& x,
  const reverse_iterator<Iterator2>& y

) -> decltype(y.current - x.current);
(since C++11)
template <class Iterator>

typename reverse_iterator<Iterator>::difference_type operator- (
  const reverse_iterator<Iterator>& x,
  const reverse_iterator<Iterator>& y

);
(until C++11)

Obtains the distance between two reverse_iterators.

[edit] Return value

y.current - x.current

[edit] Example