C++23 Ranges: Conceptual Changes and Useful Practicalities
summary
C++23 changes let views own their elements while remaining cheap to pass, enabling code that moves temporaries into adaptors instead of forcing lvalues; the demo builds a working calendar using std::chrono dates, std::generator and a custom concat implemented with generators, printing via the new format support (clang currently implements range formatting), windowing views like chunk/slide/stride and chunk_by, zip/zip_transform, the range-to-container adapter (to), and new fold variants (fold_left/fold_right/fold_left_first). The calendar and an infinite-year mode compile and run.
AI-written summary · about
chapters (41)
- 0:00Introduction
- 0:39History of Ranges
- 1:59Recap
- 3:17First
- 3:42InputOutput Iterator
- 4:35Last
- 4:53Sentinel
- 5:29Range
- 9:30View
- 10:31Empty View
- 10:53Empty Factory
- 11:57Before Ranges
- 13:08Pipe Operator
- 14:29Calendar
- 16:36Visualization
- 17:28print
- 19:47example
- 20:48more customization
- 21:39format ranges
- 22:16chunk view
- 22:42slide view
- 23:20generic algorithm
- 24:49windowed
- 25:17chunkby
- 27:10STD Generator
- 27:52Fibonacci Example
- 28:30Generator Types
- 30:11Elements of
- 30:41recursive generator
- 34:05Conceptual Changes
- 40:50Owning View
- 43:38Compile Event
- 44:08Concat View
- 45:01Range Adapter
- 46:07Closure Object
- 48:06Range Adapter Closure
- 48:51Range Closure Helper
- 50:33Range Adapter Helper
- 52:03Writing the Calendar
- 55:11Summary
- 57:01Examples
related talks
01h 02mC++20 Ranges in Practice
01h 06mC++20 Ranges in Practice
38mWhat's New In C++23
01h 34mRanges for the Standard Library
01h 09mMissing (and future?) C++ Range Concepts
01h 30mTaming C++23 - The Things About C++23 You Do Not Know
01h 01mAn Overview of Standard Ranges
01h 34mAn Overview of Standard Ranges
