C++20 in Practice: A Complete Introduction
Nicolai M. Josuttis
C++20 is huge. It will change the way we program more dramatically than C++11 did. As usual, not everything is self-explanatory, combining new features gives even more power, and there are hidden pitfalls. Therefore, it is key to really understand design and conceptional details of the new features of C++20 to use them right.
This two-day workshop will go through all major and important minor features of C++20 (covering both language and library), motivating them, providing compelling examples, and giving key insights and hints about how to use them in practice. Important C++23 extensions and modifications for these features are also covered.
As a member of the C++ standards committee, Nicolai will also give useful background information about purpose and design decisions.
As a result, you will understand the power of the programming paradigm C++20 intoduces to use them appropriately without too much frustration, because things do not work as self-explanatory as they look at first.
Outline
Topics include:
- The spaceship operator
<=>
(including code broken) - Generic functions with
auto
- Concepts, constraints, and requirements in detail
- Ranges and views in detail (including all the pitfalls of the design of views)
- Spans
- Coroutines
- jthread and stop tokens
- Barriers, latches, and semaphores, extensions for atomics, output sync streams
- Chrono extensions (calendar and time zone support)
- Formatted output (standard and user-defined formatting)
- Modules
- Extensions to compile-time computing (
consteval
,constinit
, etc.) - Template extensions (such new NTTP types)
- Several small new language and library features