std::ranges::iota_view<W, Bound>::begin
constexpr /*iterator*/ begin() const; | (since C++20) |
Obtains an iterator to the beginning value.
Return value
Example
#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';
}
Output:
2 3 4 5
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/ranges/iota_view/begin