std::ranges::split_view<V,Pattern>::sentinel
來自 cppreference.com
< cpp | ranges | split view
class /*sentinel*/; |
(C++20 起) (僅作說明*) |
|
當底層 view 型別 V 不建模 common_range 時,split_view::end 的返回型別。
目錄 |
[編輯] 資料成員
| 成員 | 描述 |
ranges::sentinel_t<V> end_ (私有) |
底層 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 是實參的關聯類時。