std::ranges::enumerate_view<V>:: iterator <Const>:: operator[]
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
| Member functions | ||||
|
(C++26)
|
||||
| Deduction guides | ||||
| Nested classes | ||||
| Iterator | ||||
|
enumerate_view::
iterator
::operator[]
|
||||
| Sentinel | ||||
|
constexpr
auto
operator
[
]
(
difference_type n
)
const
requires ranges:: random_access_range < Base > |
(C++23 起) | |
返回指定相对位置的元素。
等效于:
return
reference-type
(
pos_
+
n,
current_
[
n
]
)
;
。
目录 |
参数
| n | - | 相对于当前位置的偏移量 |
返回值
相对于当前位置偏移量为 n 处的元素。
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
(C++23)
|
访问元素
(公开成员函数) |