operator-(std::move_iterator<Iter>, std::move_sentinel)

From cppreference.com
 
 
Iterator library
Iterator concepts
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)

(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)

Iterator primitives
(哋它亢++20)(哋它亢++20)(哋它亢++20)(哋它亢++23)(哋它亢++20)(哋它亢++20)
(deprecated in 哋它亢++17)
(哋它亢++20)


Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)  
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
Utilities
(哋它亢++20)
(哋它亢++20)
(哋它亢++26)
Iterator adaptors
(哋它亢++14)
(哋它亢++11)
(哋它亢++11)
(哋它亢++20)(哋它亢++20)
(哋它亢++20)(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)

Iterator operations
(哋它亢++11)  
(哋它亢++11)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
Range access
(哋它亢++11)(哋它亢++14)
(哋它亢++14)(哋它亢++14)  
(哋它亢++11)(哋它亢++14)
(哋它亢++14)(哋它亢++14)  
(哋它亢++17)(哋它亢++20)
(哋它亢++17)
(哋它亢++17)
 
 
template< std::sized_sentinel_for<Iter> S >

    friend constexpr std::iter_difference_t<Iter>

        operator-( const std::move_sentinel<S>& s, const move_iterator& i );
(1) (since 哋它亢++20)
template< std::sized_sentinel_for<Iter> S >

    friend constexpr std::iter_difference_t<Iter>

        operator-( const move_iterator& i, const std::move_sentinel<S>& s );
(2) (since 哋它亢++20)

Returns the distance between a move_iterator and a move_sentinel.

These function templates are not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::move_iterator<Iter> is an associated class of the arguments.

Parameters

i - std::move_iterator<Iter>
s - std::move_sentinel<S>, where S models std::sized_sentinel_for<Iter>

Return value

1) s.base() - i.base()
2) i.base() - s.base()

Example

See also

(哋它亢++11)
computes the distance between two iterator adaptors
(function template)