The Small Pearls of C++20
summary
Survey of concrete C++20 additions with code demos and gotchas: shows the three‑way compare auto produces three-way compare yields strong/partial ordering depending on members, demonstrates std::span example modifies underlying vector to avoid pointer/length bugs, uses consteval/constinit for true compile‑time init, uses chrono calendar/timezone + std::format for human schedules (runs on GCC, MSVC has issues), shows atomic wait/notify, atomic_shared_ptr, semaphores/latches/barriers for coordination, stop_token interruption, and reports semaphores on Linux near atomic speed (~10× faster than condition_variable).
AI-written summary · about
chapters (20)
- 0:00Intro
- 0:40The Small Pearls
- 2:15Comparison Operator
- 4:22Examples
- 5:23Threeway comparison operator
- 6:35Aggregate initialization
- 11:25Constable
- 12:58Constant
- 14:10Static initialization
- 15:24Templates
- 17:21Span
- 21:52Container Improvements
- 24:30Special Functions
- 26:02Calendar Time Zone
- 31:38Local Time
- 33:42Winter Time
- 38:11Home of You
- 46:17semaphores
- 52:09Cooperative interruption
- 56:02Stop requests
related talks
01h 23mC++20: The Small Pearls
01h 01mC++20: The Small Pearls
59mC++20 - My Favourite Code Examples
01h 02mC++20 - My Favourite Code Examples
01h 01mC++20: What's in it for you?
01h 35mC++20 – My Favourite Code Examples
59mC++20: An (Almost) Complete Overview
01h 00mThe C++20 Standard Library: Beyond Ranges
