...

/

Advancing from Abstract Ranges to the Ranges Library

Advancing from Abstract Ranges to the Ranges Library

Learn about the transition from the abstract concept of a range to the C++20 ranges library.

Traversing ranges using iterators

A range is an abstraction of a sequence of elements, delimited by two iterators (one to the first element of the sequence and one to the one-past-the-last element). Containers such as std::vector, std::list, and std::map are concrete implementations of the range abstraction. They have ownership of the elements, and they are implemented using various data structures, such as arrays, linked lists, or trees. The standard algorithms are generic. They are ...