Ranges
std::ranges: range concepts, CPOs, views, range algorithms, and the pre-ship design cleanups.
Connected features
Papers
19 · San Diego 2018 → Prague 2020Merges the Ranges TS: range concepts, customization point objects, views and range algorithms.
Adds signed std::ssize() alongside unsigned size().
Ranges design cleanup before shipping (CPO naming, subrange adjustments).
Adds take_while, drop, drop_while, elements, keys, values and istream views.
Allows move-only single-pass iterators.
Requires contiguous iterators to support std::to_address.
Specifies iterator difference types wide enough to avoid overflow (integer-class types).
Specifies the size types of views.
Makes basic_istream_view::iterator non-copyable.
Allows move-only views.
Relaxes the over-constrained ranges comparison algorithms.
Makes range adaptors work with non-copyable iterators.
Replaces forwarding-range with the borrowed_range opt-in.
Constrains readable (now indirectly_readable) types properly.
Adds ranges versions of the newer algorithms (for_each_n, sample, clamp…).
Avoids template bloat by making take/drop on subrange-like views return the same view type.
Adds ranges::ssize.
Gives elements_view its own sentinel.
Fixes issues with the range access customization point objects.