constexpr decltype(auto) operator[]( difference_type n ) const requires ranges::random_access_range<Base>; | (since C++20) |
Returns the element at specified relative location.
Effectively returns /*get-element*/(this->base() + n)
, where for an expression e
, /*get-element*/(e)
is.
std::get<N>(*e)
, if ranges::range_reference_t<Base>
is a reference type, static_cast<E>(std::get<N>(*e))
, where E
is std::remove_cv_t<std::tuple_element_t<N, ranges::range_reference_t<Base>>>
. n | - | position relative to current location. |
the element at displacement n
relative to the current location.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/elements_view/iterator/operator_at