liveBook · Manning

Ranges API

The C++ ranges API is a standard-library facility providing ranges, views, adaptors, and algorithms for processing sequences without explicit iterator pairs.

How 2 Manning books explain it

Learn C++ by Example

<ranges> is the C++ standard library header that declares ranges, views, and range adaptors.

How it is used
Uses views and adaptors to filter or transform containers while avoiding manual iterator tracking.
How deep it goes
Demonstrates drop_while, filter, pipe chaining, and validation, but does not develop adaptor internals.
Examples
Shows vector filtering, dropping values below three, checking nonnegative rows, and comparing iterator-based removal.
What you can do after
Apply it via std::views to compose readable filtering and skipping operations over containers.

Read how Learn C++ by Example explains ranges API →

100 C++ Mistakes and How to Avoid Them

The C++ ranges API is a standard-library interface for applying algorithms to ranges of elements without requiring explicit iterator pairs.

How it is used
Simplifies standard-library algorithm calls when sorting collections such as students.
How deep it goes
Explains direct range passing and readability benefits, but stops short of surveying the API or its implementation.
Examples
Uses student sorting by GPA as the concrete ranges example.
What you can do after
Apply it via the C++ standard library by supplying a container and comparison function instead of iterator pairs.

Read how 100 C++ Mistakes and How to Avoid Them explains ranges API →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.