C++20 in Practice: A Complete Introduction
C++20 in Practice: A Complete Introduction is a two-day onsite training course with programming examples, taught by Nicolai Josuttis, one of our most popular instructors. It is offered at the Gaylord Rockies from 09:00 to 17:00 Aurora time (MDT) on Saturday and Sunday, September 10th and 11th, 2022 (immediately prior to the conference). Lunch is included.
C++20 is the latest new release of C++, now supported by major compilers. This class teaches it in a way that you understand its power and can start to use it in practice.
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 traps. So, the key question is what this means in practice.
This class will go through all major and important minor features of C++20 (covering both language and library), introduce them conceptually, provide compelling examples, and give key insights and hints about how to use them in practice.
As a member of the C++ standards committee, Nicolai will also give useful background information about purpose and design decisions.
Students are expected to have a basic knowledge of programming in Modern C++ (loops, auto, templates, references, …).
Students are not required to bring any laptop. We will go through code examples together with the laptop of the presenter.
We will cover all new language features with real examples that work and provide insights about the power of C++ but also its flaws and traps. Topics include:
- The spaceship operator <=> (including broken code)
- Generic functions with auto
- Concepts and requirements
- Details of concepts (using concepts, semantics constraints, concepts versus type traits, standard concepts, standard concepts)
- Ranges and views
- Details of ranges and views (dealing with const, iterator categories, projections, pipelines, sentinels)
- 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)
- Dealing with modules in practice
- consteval, constinit, and compile-time vectors/strings
- New NTTP types (floats, lambdas, objects, …)
- New lambda features
- Extensions for aggregates
- Several small new language and library features (bits handling, source location, typename, string extensions, char8_t, …)