C++20 Ranges - The Stuff of Science Fiction
summary
C++20 ranges popularize a pattern of using static inline const function objects as range adapters that let code overload the call operator (something lambdas cannot do), implement filters/transforms, and serve as lightweight customization points. The video shows actual code patterns, cites Eric Niebler’s nebloid and the broader customization point object idea, argues naming options like “sci‑fi pattern” or “unclassified function object,” and explains when static/inline/constexpr matter.
AI-written summary · about
chapters (12)
- 0:00Introduction: Why C++ is Fun
- 0:12Discovering Ranges in C++20
- 0:23Filtering with Static Casts
- 0:44Introducing the Design Pattern
- 1:08Using Function Objects Instead of Lambdas
- 1:40The Problem with Naming
- 2:04Reviewing Existing Names: Nebloid and Beyond
- 2:30Identifying the Pattern Across Range Adapters
- 3:00From Functors to Sci-Fi
- 3:36The Case for Better Naming
- 4:01The “Unclassified Function Object”
- 4:20The Sci-Fi Analogy and Party Defense Mechanism
related talks
01h 02mC++20 Ranges in Practice
01h 01mAn Overview of Standard Ranges
01h 01mFrom STL to Ranges: Using Ranges Effectively
01h 34mAn Overview of Standard Ranges
01h 06mC++20 Ranges in Practice
01h 09mMissing (and future?) C++ Range Concepts
01h 02mC++20 - My Favourite Code Examples
01h 35mC++20 – My Favourite Code Examples
