Skip to content

Search topics & cppreference

Search all study topics, concept maps, and 6,587 C++ and C reference pages.

operator-(std::move_iterator)

Returns the distance between two iterator adaptors.

Iterator
  • C++11
  • C++17
1 min readView on cppreference
NotebookLM
Defined in header <iterator>
template< class Iter1, class Iter2 >
auto operator-( const move_iterator<Iter1>& lhs,
                const move_iterator<Iter2>& rhs )
    -> decltype(lhs.base() - rhs.base());
(since C++11)
(constexpr since C++17)

Returns the distance between two iterator adaptors.

Parameters

lhs, rhs - iterator adaptors to compute the difference of

Return value

lhs.base() - rhs.base()

Example

This section is incomplete
Reason: no example

See also

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

Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.