名前空間
変種
操作

「cpp/iterator/move iterator/operator cmp2」の版間の差分

提供: cppreference.com
(ページの作成:「{{title|1=operator==, !=<small>(std::move_iterator<Iter>, std::move_sentinel)</small>}} {{cpp/iterator/move_iterator/navbar}} {{dcl begin}} {{dcl | num=1 | since=c++20 | ...」)
 
3行: 3行:
 
{{dcl begin}}
 
{{dcl begin}}
 
{{dcl | num=1 | since=c++20 | 1=
 
{{dcl | num=1 | since=c++20 | 1=
template<Sentinel<Iter> S>
+
template<<Iter> S>
 
   friend constexpr bool
 
   friend constexpr bool
 
     operator!=(const std::move_iterator& i, const std::move_sentinel<S>& s);
 
     operator!=(const std::move_iterator& i, const std::move_sentinel<S>& s);
 
}}
 
}}
 
{{dcl | num=2 | since=c++20 | 1=
 
{{dcl | num=2 | since=c++20 | 1=
template<Sentinel<Iter> S>
+
template<<Iter> S>
 
   friend constexpr bool
 
   friend constexpr bool
 
     operator==(const std::move_sentinel<S>& s, const std::move_iterator& i);
 
     operator==(const std::move_sentinel<S>& s, const std::move_iterator& i);
 
}}
 
}}
 
{{dcl | num=3 | since=c++20 | 1=
 
{{dcl | num=3 | since=c++20 | 1=
template<Sentinel<Iter> S>
+
template<<Iter> S>
 
   friend constexpr bool
 
   friend constexpr bool
 
     operator!=(const std::move_iterator& i, const std::move_sentinel<S>& s);
 
     operator!=(const std::move_iterator& i, const std::move_sentinel<S>& s);
 
}}
 
}}
 
{{dcl | num=4 | since=c++20 | 1=
 
{{dcl | num=4 | since=c++20 | 1=
template<Sentinel<Iter> S>
+
template<<Iter> S>
 
   friend constexpr bool
 
   friend constexpr bool
 
     operator!=(const std::move_sentinel<S>& s, const std::move_iterator& i);
 
     operator!=(const std::move_sentinel<S>& s, const std::move_iterator& i);
31行: 31行:
 
{{par begin}}
 
{{par begin}}
 
{{par | i | {{tt|std::move_iterator<Iter>}} }}
 
{{par | i | {{tt|std::move_iterator<Iter>}} }}
{{par | s | {{tt|std::move_sentinel&lt;S>}} ただし {{tt|S}} は {{tt|std::Sentinel<Iter>}} をモデル化します }}
+
{{par | s | {{tt|std::move_sentinel&lt;S>}} ただし {{tt|S}} は {{tt|std::<Iter>}} をモデル化します }}
 
{{par end}}
 
{{par end}}
  

2019年8月30日 (金) 22:10時点における版

 
 
イテレータライブラリ
イテレータコンセプト
イテレータプリミティブ
アルゴリズムのコンセプトとユーティリティ
間接呼び出し可能コンセプト
共通アルゴリズム要件
ユーティリティ
イテレータアダプタ
ストリームイテレータ
イテレータのカスタマイゼーションポイント
イテレータ操作
(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 std::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 std::move_iterator& i);
(2) (C++20以上)
template<std::sentinel_for<Iter> S>

  friend constexpr bool

    operator!=(const std::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 std::move_iterator& i);
(4) (C++20以上)

move_iteratormove_sentinel を比較します。

これらの関数は、通常の非修飾名または修飾名の名前探索に対して可視ではなく、 std::move_iterator<Iter> または std::move_sentinel<S> が引数の関連クラスであるときの実引数依存の名前探索 によってのみ発見できます。

引数

i - std::move_iterator<Iter>
s - std::move_sentinel<S> ただし Sstd::sentinel_for<Iter> をモデル化します

戻り値

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

関連項目

ベースとなるイテレータを比較します
(関数テンプレート) [edit]