std::ranges::range

From cppreference.com
< cpp‎ | ranges
 
 
 
Defined in header <ranges>
template< class T >

concept range = requires(T& t) {
  ranges::begin(t); // equality-preserving for forward iterators
  ranges::end  (t);

};

The range concept defines the requirements of a type that allows iteration over its elements by providing an iterator and sentinel that denote the elements of the range.

Semantic requirements

Given an expression E such that decltype((E)) is T, T models range only if

Note: In the definition above, the required expressions ranges::begin(std::forward<T>(t)) and ranges::end(std::forward<T>(t)) do not require implicit expression variations.