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

来自cppreference.com
 
 
迭代器库
迭代器概念
迭代器原语
迭代器适配器
流迭代器
迭代器定制点
迭代器操作
(C++11)
(C++11)
范围访问
(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) (C++20 起)
template<std::sentinel_for<Iter> S>

  friend constexpr bool

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

  friend constexpr bool

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

  friend constexpr bool

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

比较 move_iteratormove_sentinel

这些函数对通常无限定有限定查找不可见,而只能由参数依赖查找std::move_iterator<Iter> 为参数的关联类时找到。

参数

i - std::move_iterator<Iter>
s - std::move_sentinel<S> ,其中 S 实现 std::sentinel_for<Iter>

返回值

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

参阅

比较底层迭代器
(函数模板)