How C++20 Changes the Way We Write Code
summary
Claims C++20 reshapes C++ as much as C++11, centering on the coroutines, concepts, ranges, and modules quartet. Coroutines produce compiler-generated frames, a promise type, and a generator object (heap-allocated unless optimized to stack); use cppcoro or wait for std::generator in C++23. Concepts give readable requires syntax and precise constraints, fixing painful SFINAE patterns. Ranges provide lazy views, pipe composition and projections (views::iota, no explicit loops). Modules replace headers with compiler BMIs, prevent macro leakage and speed builds. std::erase removes the erase‑remove idiom.
AI-written summary · about
chapters (11)
- 0:00Introduction to C++20
- 1:37Why C++20 is special
- 5:50Introduction to coroutines
- 12:45Understanding the API
- 22:38Implementing generators
- 28:42Asynchronous coroutines
- 32:17Introduction to concepts
- 37:37Advanced concept design
- 43:36The ranges library
- 51:20Introduction to modules
- 58:36Final takeaways and fixes
related talks
01h 01mC++20: What's in it for you?
01h 31mC++20: C++ at 40
01h 33mHow C++23 Changes the Way We Write Code
01h 01mC++20: The Small Pearls
01h 35mC++20 – My Favourite Code Examples
01h 00mThe C++20 Standard Library: Beyond Ranges
01h 02mC++20 - My Favourite Code Examples
59mC++20 - My Favourite Code Examples
