From cppreference.com
constexpr/*iterator*/begin()const;(since C++20)Obtains an
to the beginning value.
Return value
{
}
Example
Run this code
#include<iostream>#include<ranges>intmain(){autoiota{std::views::iota(2,6)};autoiter{iota.begin()};while(iter!=iota.end())std::cout<<*iter++<<' ';std::cout<<'\n';}Output:
2 3 4 5