Namespaces
Variants
Views
Actions

operator==, !=(std::move_iterator<Iter>, std::move_sentinel)

From cppreference.com
 
 
Iterator library
Iterator concepts
Iterator primitives
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<std::sentinel_for<Iter> S>

  friend constexpr bool

    operator!=(const move_iterator& i, const std::move_sentinel<S>& s);
(1) (since C++20)
template<std::sentinel_for<Iter> S>

  friend constexpr bool

    operator==(const std::move_sentinel<S>& s, const move_iterator& i);
(2) (since C++20)
template<std::sentinel_for<Iter> S>

  friend constexpr bool

    operator!=(const move_iterator& i, const std::move_sentinel<S>& s);
(3) (since C++20)
template<std::sentinel_for<Iter> S>

  friend constexpr bool

    operator!=(const std::move_sentinel<S>& s, const move_iterator& i);
(4) (since C++20)

Compare a move_iterator and a move_sentinel.

These functions 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.

[edit] Parameters

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

[edit] Return value

1-2) i.base() == s.base()
3-4) !(i == s)

[edit] See also

compares the underlying iterators
(function template) [edit]