Range adaptors - 5 years after C++20
summary
Ranges are large and specific: the talk argues that borrowing vs owning views is a real API-level distinction, documents that some adapters (filter) are non-borrowed while others (views::take) are borrowed, and shows the concrete performance bug—filter then reverse yields apparent O(N^2) unless the view caches begin on first iteration. It calls out single-pass generators and lifetime pitfalls, points to the opt‑in borrowed_range trait, and demonstrates why const‑iterability and iterator ownership are the core design tradeoffs.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:57Talk on ranges controversy
- 9:19Design decisions
- 11:29Core concepts
- 27:32Minimal vs meaningful categories
- 30:46Indirection and lifetime issues
- 45:45Range adapters and types
- 47:33Caching begin in adapters
- 53:18Indirection forms in adapters
- 57:12Evolving view concept
- 1:00:00Summary
related talks
01h 06mConquering C++20 Ranges
01h 04mEffective Ranges: A Tutorial for Using C++2x Ranges
01h 05mBetter C++ ranges
01h 09mTaming the Filter View in C++ Programming
01h 00mBack to Basics: (Range) Algorithms in C++
54m"Distributed Ranges": Model for Building Distributed Data Structures, Algorithms & Views
40mRanges and Iterators for Numerical Problems
56mThrowing Tools at Ranges
