std::ranges::split_view<V,Pattern>::sentinel
来自cppreference.com
< cpp | ranges | split view
| class /*sentinel*/; |
(C++20 起) (仅用于阐述*) |
|
当底层 view 类型(V)并不实现 common_range 时为 split_view::end 的返回类型。
数据成员
| 成员名 | 定义 |
end_ (私有)
|
ranges::sentinel_t<V> 类型的对象,是底层 view 的哨位。(仅用于阐述的成员对象*) |
成员函数
| (构造函数) (C++20) |
构造哨位 (公开成员函数) |
std::ranges::split_view::sentinel::sentinel
| /*sentinel*/() = default; |
(1) | (C++20 起) |
| constexpr explicit /*sentinel*/( ranges::split_view& parent ); |
(2) | (C++20 起) |
非成员函数
| operator== (C++20) |
比较底层迭代器和底层哨位 (函数) |
operator==(std::ranges::split_view::iterator, std::ranges::split_view::sentinel)
| friend constexpr bool operator==( const /*iterator*/& x, const /*sentinel*/& y ); |
(C++20 起) | |
等价于 return x.cur_ == y.end_ and !x.trailing_empty_;。
!= 运算符从 operator== 运算符合成。
此函数对常规的无限定或有限定查找不可见,而只能在 std::ranges::split_view::sentinel 为实参的关联类时由实参依赖查找找到。