名稱空間
變體
操作

std::ranges::slide_view<V>::iterator<Const>::operator[]

來自 cppreference.com
< cpp‎ | ranges‎ | slide view‎ | iterator
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
constexpr auto operator[]( difference_type pos ) const
    requires ranges::random_access_range<Base>;
(C++23 起)

返回指定相對位置的元素。

current_n_ 為底層資料成員。等價於: return views::counted(current_ + pos, n_);

目錄

[編輯] 引數

pos - 相對於當前位置的偏移量

[編輯] 返回值

相對於當前位置,偏移量為 pos 處的元素(型別為 value_type)。

[編輯] 示例

[編輯] 參見

(C++23)
訪問元素
(公開成員函式)