24 Ranges library [ranges]

24.4 Range requirements [range.req]

24.4.5 Other range refinements [range.refinements]

The output_­range concept specifies requirements of a range type for which ranges​::​begin returns a model of output_­iterator ([iterator.concept.output]).
input_­range, forward_­range, bidirectional_­range, and random_­access_­range are defined similarly.
template<class R, class T> concept output_­range = range<R> && output_iterator<iterator_t<R>, T>; template<class T> concept input_­range = range<T> && input_iterator<iterator_t<T>>; template<class T> concept forward_­range = input_range<T> && forward_iterator<iterator_t<T>>; template<class T> concept bidirectional_­range = forward_range<T> && bidirectional_iterator<iterator_t<T>>; template<class T> concept random_­access_­range = bidirectional_range<T> && random_access_iterator<iterator_t<T>>;
contiguous_­range additionally requires that the ranges​::​data customization point ([range.prim.data]) is usable with the range.
template<class T> concept contiguous_­range = random_access_range<T> && contiguous_iterator<iterator_t<T>> && requires(T& t) { { ranges::data(t) } -> same_as<add_pointer_t<range_reference_t<T>>>; };
The common_­range concept specifies requirements of a range type for which ranges​::​begin and ranges​::​end return objects of the same type.
Example
:
The standard containers ([containers]) model common_­range.
— end example
 ]
template<class T> concept common_­range = range<T> && same_as<iterator_t<T>, sentinel_t<T>>;
The viewable_­range concept specifies the requirements of a range type that can be converted to a view safely.
template<class T> concept viewable_­range = range<T> && (safe_range<T> || view<decay_t<T>>);