Namespaces
Variants
Views
Actions

operator-(move_iterator)

From cppreference.com
< cpp‎ | iterator‎ | move iterator
Revision as of 19:43, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
template< class Iterator >

typename reverse_iterator<Iterator>::difference_type
    operator-( const move_iterator<Iterator>& lhs,

               const move_iterator<Iterator>& rhs );
(until C++11)
template< class Iterator1, class Iterator2 >

auto operator-( const move_iterator<Iterator1>& lhs,

                const move_iterator<Iterator2>& rhs ) -> decltype(lhs.base() - rhs.base());
(until C++11)

Returns the distance between two iterator adaptors.

[edit] Parameters

lhs, rhs - iterator adaptors to compute the difference of

[edit] Return value

lhs.base() - rhs.base()

[edit] Example