名稱空間
變體
操作

std::ranges::enumerate_view<V>::sentinel

來自 cppreference.com
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
template< bool Const >
class /*sentinel*/;
(C++23 起)
(僅作說明*)

當底層檢視不是 common_range 時,enumerate_view::end 的返回型別。

型別 /*sentinel*/<true> 由 const-qualified 過載返回。型別 /*sentinel*/<false> 由 non-const-qualified 過載返回。

目錄

[edit] 成員型別

成員型別 定義
Base (私有) 如果 Consttrue,則為 const V,否則為 V
(僅供說明的成員型別*)

[edit] 資料成員

成員物件 定義
end_ (私有) 型別為 ranges::sentinel_t<Base> 的哨兵
(僅用於闡釋的成員物件*)

[edit] 成員函式

構造一個哨位
(公共成員函式) [編輯]
返回指示範圍末尾的哨兵
(公開成員函式)

[edit] 非成員函式

將哨兵與 enumerate_view::begin 返回的迭代器進行比較
(函式) [編輯]
(C++23)
計算哨兵與 enumerate_view::begin 返回的迭代器之間的距離
(函式) [編輯]

[edit] 示例

[edit] 參考文獻

  • C++23 標準 (ISO/IEC 14882:2024)
  • 26.7.23.4 類模板 enumerate_view::sentinel [range.enumerate.sentinel]

[edit] 另請參閱