An Introduction to the Ranges Library

Learn about constrained algorithms, range adaptors, and more in "The Ranges Library" section.

We'll cover the following

The previous section was dedicated to understanding the three main pillars of the standard library: containers, iterators, and algorithms. Throughout that section, we used the abstract concept of range to represent a sequence of elements delimited by two iterators. The C++20 standard makes it easier to work with ranges by providing a ranges library consisting of two main parts: on one hand, types that define nonowning ranges and adaptations of ranges, and on the other hand, algorithms that work with these range types and don’t require iterators to define a range of elements.

Overview of the ranges library

Get hands-on with 1200+ tech skills courses.