std::ranges::iota_view<W, Bound>:: begin
From cppreference.net
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
std::ranges::iota_view
|
constexpr
/*iterator*/
begin
(
)
const
;
|
(начиная с C++20) | |
Получает итератор на начальное значение.
Возвращаемое значение
Пример
Запустить этот код
#include <iostream> #include <ranges> int main() { auto iota{std::views::iota(2, 6)}; auto iter{iota.begin()}; while (iter != iota.end()) std::cout << *iter++ << ' '; std::cout << '\n'; }
Вывод:
2 3 4 5