std::ranges::enumerate_view<V>::iterator<Const>::operator[]
constexpr auto operator[]( difference_type n ) const
requires ranges::random_access_range<Base>
| (since C++23) |
Возвращает элемент в указанном относительном расположении. Эквивалентно: return reference-type(pos_ + n, current_[n]);.
Параметры
| n | - | положение относительно текущего расположения |
Значение результата
Элемент со смещением n относительно текущего расположения.
Пример
См. также
|
(C++23) | доступ к элементу (публичный член-функция) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/enumerate_view/iterator/operator_at