Unlocking the Value of C++20 Features
summary
Practical, example-rich tour of C++20 that shows concrete wins: use of remove_cvref to replace verbose decay patterns, a span-based BST builder that avoids index bugs, working consteval polymorphism that creates compile-time arrays of virtual objects, constexpr allocation and NTTP string tricks (user literal + fixed_string), and library features like std::popcount, std::endian, std::bit_cast plus a custom wider bit_cast on GitHub. Concurrency demos use jthread, stop_token, semaphore, latch, barrier with runnable snippets and observed correct behavior.
AI-written summary · about
chapters (29)
- 0:00Introduction and speaker background
- 2:48C++20 big four features overview
- 7:54Abbreviated functions and concepts
- 11:53Remove CV ref and library changes
- 12:13Designated initializers
- 13:36Range-based loops with init-statement
- 14:58Defaulted comparison operators
- 16:28Spaceship operator explained
- 19:01No unique address feature
- 21:30Lambda parameter expansion
- 22:33Generic lambdas
- 25:45Consteval and allocation
- 28:17NTTP relaxation
- 29:44User-defined literals
- 30:50Conditional explicit
- 31:34Consteval polymorphism
- 33:01Library features overview
- 34:01Safe comparisons
- 34:47Span container view
- 37:56Bit header utilities
- 39:44Bit manipulation functions
- 42:07Bit cast safety
- 44:15Source location tracking
- 46:07Jthread and joinable threads
- 47:30Semaphores in C++20
- 49:37Stop tokens and sources
- 51:03Latches and barriers
- 52:32Barrier callbacks
- 54:44Summary and encouragement
