An Overview of Standard Ranges
summary
C++20 adds concept-constrained algorithms, range-based overloads that accept whole containers, and lazy composable adapters called views|filter|transform that avoid temporary copies; projections let algorithms operate on member fields via pointers-to-members. Sentinels include unreachable_sentinel which the compiler sees as never-equal to an iterator, removing a compare and improving tight-loop codegen (microbenchmarks show measurable speedups). Three compatible libraries are usable today: range-v3, CMCSTL2, and NanoRange, with varying compiler concept support.
AI-written summary · about
chapters (10)
- 0:00Introduction and welcome
- 1:55What are standard ranges
- 10:17Concepts in C++20
- 18:49Constrained algorithms and better errors
- 22:59Range-based overloads
- 25:16Sentinels and optimizations
- 33:23Projections explained
- 46:12Views and lazy evaluation
- 57:11Using ranges today
- 1:00:47Q&A and closing
related talks
01h 34mAn Overview of Standard Ranges
01h 02mC++20 Ranges in Practice
01h 06mC++20 Ranges in Practice
01h 09mMissing (and future?) C++ Range Concepts
01h 09mRe-Release: Missing (and future?) C++ Range Concepts
05mC++20 Ranges - The Stuff of Science Fiction
01h 25mC++23 Ranges: Conceptual Changes and Useful Practicalities
01h 34mRanges for the Standard Library
