24 Ranges library [ranges]

24.4 Range requirements [range.req]

24.4.5 Other range refinements [range.refinements]

The OutputRange concept specifies requirements of a Range type for which ranges::begin returns a model of OutputIterator.
InputRange, ForwardRange, BidirectionalRange, and RandomAccessRange are defined similarly.
template<class R, class T> concept OutputRange = Range<R> && OutputIterator<iterator_t<R>, T>; template<class T> concept InputRange = Range<T> && InputIterator<iterator_t<T>>; template<class T> concept ForwardRange = InputRange<T> && ForwardIterator<iterator_t<T>>; template<class T> concept BidirectionalRange = ForwardRange<T> && BidirectionalIterator<iterator_t<T>>; template<class T> concept RandomAccessRange = BidirectionalRange<T> && RandomAccessIterator<iterator_t<T>>;
ContiguousRange additionally requires that the ranges::data customization point ([range.prim.data]) is usable with the range.
template<class T> concept ContiguousRange = RandomAccessRange<T> && ContiguousIterator<iterator_t<T>> && requires(T& t) { { ranges::data(t) } -> Same<add_pointer_t<iter_reference_t<iterator_t<T>>>>; };
The CommonRange concept specifies requirements of a Range type for which ranges::begin and ranges::end return objects of the same type.
[Example
:
The standard containers model CommonRange.
end example
]
template<class T> concept CommonRange = Range<T> && Same<iterator_t<T>, sentinel_t<T>>;
The ViewableRange concept specifies the requirements of a Range type that can be converted to a View safely.
template<class T> concept ViewableRange = Range<T> && (forwarding-range<T> || View<decay_t<T>>);