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 S
together with the type I
of the object returned by ranges::begin
models sentinel_for<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 destruction and move 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.