std::ranges::adjacent_transform_view<V,F,N>::iterator<Const>::operator[]
constexpr decltype(auto) operator[]( difference_type n ) const
requires ranges::random_access_range<Base>;
| (since C++23) |
Возвращает элемент в указанном относительном расположении.
Пусть parent_ и inner_ — члены данных итератора. Эквивалентно:
return apply([&](const auto&... iters) -> decltype(auto)
{
return invoke(*parent_->fun_, iters[n]...);
},
inner_.current_);Параметры
| n | - | положение, относительное к текущему расположению |
Возвращаемое значение
Элемент в смещении n относительно текущего расположения.
Пример
См. также
|
(C++23) | обращается к элементу (публичный метод-член) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/adjacent_transform_view/iterator/operator_at