std::ranges::stride_view<V>:: iterator <Const>:: operator*
From cppreference.net
<
cpp
|
ranges
|
stride view
|
iterator
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
std::ranges::stride_view
| Member functions | ||||
|
(C++26)
|
||||
| Deduction guides | ||||
| Iterator | ||||
| Member functions | ||||
|
stride_view::
iterator
::operator*
|
||||
| Non-member functions | ||||
|
constexpr
decltype
(
auto
)
operator
*
(
)
const
;
|
(desde C++23) | |
Devuelve los elementos hacia
V
el iterador subyacente
current_
al que apunta.
Equivalente a: return * current_ ; .
Contenidos |
Parámetros
(ninguno)
Valor de retorno
El elemento actual.
Notas
operator - > no está proporcionado.
Ejemplo
Ejecutar este código
#include <ranges> int main() { constexpr static auto v = {'a', 'b', 'c', 'd', 'e'}; constexpr auto view{v | std::views::stride(2)}; constexpr auto iter{view.begin() + 1}; static_assert(*iter == 'c'); static_assert(*(view.begin() + 2) == 'e'); }
Véase también
|
(C++23)
|
accede a un elemento por índice
(función miembro pública) |