C++20 - My Favourite Code Examples
summary
Shows concrete C++20 recipes: using concepts with requires expressions to select overloads and use compile-time if to choose push_back vs insert; real examples of ranges and views including sentinels, subrange views, lazy pipeable transforms, and sorting up to a sentinel; defaulted spaceship and class non-type template parameters to compare and pass aggregates; concurrency primitives: barrier, jthread+stop_token, binary_semaphore, atomic_ref and wait/notify based ticketing; and std::format plus chrono timezones/clocks with leap‑second handling.
AI-written summary · about
chapters (12)
- 0:00Intro
- 0:53Concepts and Requirements
- 8:41Ranges
- 14:07End Iterator
- 14:22Generic End Iterator
- 16:02Special Features
- 20:47Comparison Operators
- 25:37Views
- 33:32Threads
- 41:58Chrono
- 45:54Time Zones
- 49:55Clocks








