std::ranges::filter_view<V,Pred>::哨兵
class /*sentinel*/;
|
(C++20 起) (*仅用于阐述*) |
|
当底层视图不满足common_range V时,filter_view::end的返回类型。
数据成员
| 成员 | 描述 |
V end_ (私有)
|
底层视图 的哨位(仅用于阐述的成员对象*) |
成员函数
|
构造哨兵
(公开成员函数) |
|
|
返回底层哨兵
(公开成员函数) |
std::ranges::filter_view:: sentinel :: sentinel
|
/*sentinel*/
(
)
=
default
;
|
(1) | (since C++20) |
|
constexpr
explicit
/*sentinel*/
(
filter_view
&
parent
)
;
|
(2) | (since C++20) |
std::ranges::filter_view:: sentinel :: base
|
constexpr
ranges::
sentinel_t
<
V
>
base
(
)
const
;
|
(since C++20) | |
等价于 return end_ ; 。
非成员函数
|
(C++20)
|
比较底层迭代器与底层哨位
(函数) |
operator== (std::ranges::filter_view:: iterator , std::ranges::filter_view:: sentinel )
|
friend
constexpr
bool
operator
==
(
const
/*iterator*/
&
x,
const /*sentinel*/ & y ) ; |
(since C++20) | |
等价于
return
x.
current_
==
y.
end_
;
,其中
current_
是包装在
filter_view::
iterator
中的底层迭代器。
!=
运算符由
operator==
合成
。
此函数对普通的
非限定查找
或
限定查找
不可见,仅当
std::ranges::filter_view::
sentinel
是参数的关联类时,才能通过
实参依赖查找
找到。