operator-(reverse_iterator)

template< class Iterator >
typename reverse_iterator<Iterator>::difference_type 
    operator-( const reverse_iterator<Iterator>& lhs,
               const reverse_iterator<Iterator>& rhs );
(until C++11)
template< class Iterator1, class Iterator2 >
auto operator-( const reverse_iterator<Iterator1>& lhs,
                const reverse_iterator<Iterator2>& rhs ) -> decltype(rhs.base() - lhs.base());
(since C++11)

Returns the distance between two iterator adaptors.

Parameters

lhs, rhs - iterator adaptors to compute the difference of

Return value

rhs.base() - lhs.base().

Example

doc_CPP
2016-10-11 09:59:27
Comments
Leave a Comment

Please login to continue.