Agenda: C++ - Overview Of New Language Features (Around C++20)¶
The audience consists of professional programmers who are not new to C++. As such, rather than reinforcing each topic through exercises, it is more important to discuss matters and to develop a common knowledge and a common sense.
Throughout the training, the presentation style will be live-coding-by-trainer, only falling back to a traditional frontal presentation style where applicable.
News From The Library¶
Container and algorithms overview (here). Show hash-table based data structures
std::unordered_set<>
andstd::unordered_map<>
[1].std::array<>
[1]Execution policies of parallel algorithms [1]
std::span<>
[1]Ranges and views (here)
std::fmt
(vsprintf()
) [1]std::filesystem. In addition to basic functionality, show how to handle UTF-8 encoded paths (
std::filesystem::u8path
) [1]std::tuple<>
[1]
New From The Language¶
Multithreading, Memory Model, Smart Pointers, And Move Semantics¶
This section is a bit involved as all of this is somehow related.
From Multithreading, C++ Memory Model
The C++ Memory Model. This briefly shows what a race condition is, and gives mutex examples.
Move Semantics, Rvalue References. Explain Perfect Forwarding, only to show that this is a different concept but looks syntactically the same.
C++ Executed At Compile Time (The constexpr
Engine)¶
From const, constexpr, constinit, consteval
Footnotes