std::ranges::filter_view<V,Pred>::sentinel
class
/*sentinel*/;
//
仅用于阐释
|
(C++20 起) | |
底层 view
类型(V
)不满足 common_range
时
filter_view::end
的返回类型。
名称 sentinel
仅用于阐释目的。
数据成员
sentinel
的典型实现仅保有一个非静态数据成员:底层 view
的哨位(此处示为
end_
,仅用于阐释)。
成员函数
(构造函数)
(C++20)
|
构造哨位 (公开成员函数) |
base
(C++20)
|
返回底层哨位 (公开成员函数) |
std::ranges::filter_view::sentinel::sentinel
/*sentinel*/()
=
default;
|
(1) | (C++20 起) |
constexpr
explicit
/*sentinel*/(
filter_view&
parent );
|
(2) | (C++20 起) |
end_
。
std::ranges::filter_view::sentinel::base
constexpr
ranges::sentinel_t<V>
base()
const;
|
(C++20 起) | |
等价于 return end_; 。
非成员函数
operator==
(C++20)
|
比较底层迭代器与底层哨位 (函数) |
operator==(std::ranges::filter_view::iterator, std::ranges::filter_view::sentinel)
friend
constexpr
bool
operator==(
const
/*iterator*/&
x,
const /*sentinel*/& y ); |
(C++20 起) | |
等价于 return x.current_ == y.end_; ,其中
current_
为包装于 filter_view::iterator
的底层迭代器。
!=
运算符从 ==
运算符合成。
此函数对通常无限定或有限定查找不可见,而只能在
std::ranges::filter_view::sentinel
为参数的关联类时由实参依赖查找找到。