Namespaces
Variants
Views
Actions

operator-(std::move_iterator)

From cppreference.com
 
 
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
Utilities
(C++20)
Iterator adaptors
Stream iterators
Iterator customization points
Iterator operations
(C++11)
(C++11)
Range access
(C++11)(C++14)
(C++11)(C++14)
(C++17)(C++20)
(C++14)(C++14)
(C++14)(C++14)
(C++17)
(C++17)
 
 
template< class Iterator1, class Iterator2 >

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

              ) -> decltype(lhs.base() - rhs.base());
(since C++11)
(until C++17)
template< class Iterator1, class Iterator2 >

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

                        ) -> decltype(lhs.base() - rhs.base());
(since C++17)

Returns the distance between two iterator adaptors.

Contents

[edit] Parameters

lhs, rhs - iterator adaptors to compute the difference of

[edit] Return value

lhs.base() - rhs.base()

[edit] Example

[edit] See also

advances or decrements the iterator
(public member function) [edit]
(C++11)
advances the iterator
(function template) [edit]