std::ranges::iota_view<W, Bound>:: end
From cppreference.net
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
std::ranges::iota_view
|
constexpr
auto
end
(
)
const
;
|
(1) | (desde C++20) |
|
constexpr
/*iterator*/
end
(
)
const
requires
std::
same_as
<
W, Bound
>
;
|
(2) | (desde C++20) |
1)
Obtiene un
sentinel
que representa el valor centinela:
-
Si
Boundes std::unreachable_sentinel_t , retorna std:: unreachable_sentinel . -
En caso contrario, retorna
sentinel {bound_ } .
2)
Obtiene un
iterator
al valor centinela.
Valor de retorno
1)
Como se especificó anteriormente.
Ejemplo
Ejecutar este código
#include <iostream> #include <ranges> int main() { auto iota{std::views::iota(2, 6)}; auto end{iota.end()}; for (auto iter{iota.begin()}; iter != end; ++iter) std::cout << *iter << ' '; std::cout << '\n'; }
Salida:
2 3 4 5