| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | |||||||||
| |||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
constexpr/*iterator*/ begin()const; | (since C++20) | |
Obtains aniterator to the beginning value.
#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