名前空間
変種
操作

std::ranges::filter_view<V,Pred>::sentinel

From cppreference.com
< cpp‎ | ranges‎ | filter view
 
 
Rangesライブラリ
Rangeアダプタ
 
 
class /*sentinel*/;
(C++20以降)
(説明用*)

基盤となる view Vcommon_range をモデル化していない場合の、filter_view::end の戻り値の型です。

目次

[編集] データメンバ

メンバ 定義
V end_ (private) 基盤となる view のセンチネル
(説明用のメンバオブジェクト*)

[編集] メンバ関数

センチネルを構築します
(public member function)
基盤となるセンチネルを返します
(public member function)

std::ranges::filter_view::sentinel::sentinel

/*sentinel*/() = default;
(1) (C++20以降)
constexpr explicit /*sentinel*/( filter_view& parent );
(2) (C++20以降)
1) デフォルトメンバ初期化子(= ranges::sentinel_t<V>())を介して、end_ を値初期化します。
2) end_ranges::end(parent.base_) で初期化します。

std::ranges::filter_view::sentinel::base

constexpr ranges::sentinel_t<V> base() const;
(C++20以降)

return end_; と同等です。

[編集] 非メンバ関数

基底イテレータと基底センチネルを比較する
(関数)

operator==<small>(std::ranges::filter_view::iterator, std::ranges::filter_view::sentinel)</small>

friend constexpr bool operator==( const /*iterator*/& x,
                                  const /*sentinel*/& y );
(C++20以降)

return x.current_ == y.end_; と同等です。ここで、current_filter_view::iterator でラップされた基盤となるイテレータです。

!= 演算子は operator== から合成される。

この関数は、通常の 非修飾 または 修飾 ルックアップでは可視ではなく、std::ranges::filter_view::sentinel が引数に関連付けられたクラスである場合にのみ、引数依存の名前探索 によって検出されます。

English 日本語 中文(简体) 中文(繁體)