Ranges are an abstraction that allow a C++ program
to operate on elements of data structures uniformly.
on a range returns an object
whose type models Iterator.
on a range returns an object whose type S
together with the type I
of the object returned by ranges::begin
models Sentinel<S, I>.
The library formalizes the interfaces, semantics, and complexity of ranges
to enable algorithms and range adaptors that work efficiently
on different types of sequences.
concept requires that
return an iterator and a sentinel, respectively.
concept refines Range
the requirement that the number of elements in the range can be determined
in constant time using the ranges::size
concept specifies requirements on a Range
with constant-time copy and assign operations.
Several refinements of Range
that arise frequently in concepts and algorithms.
Common ranges are ranges for which
return objects of the same type.
(Contiguous, bidirectional, forward, input, and output ranges
are defined similarly.
Viewable ranges can be converted to views.