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, falling back to a traditional frontal presentation style where applicable.
Didactic High Speed#
Smart Pointers#
Move Semantics, Rvalue References is a complex topic to
explain. A smart pointer overview is a good thing to have anyway. Lets
start with that, and - through std::unique_ptr
- get insight in what
moving is from a user’s point of view.
From Smart Pointers: std::unique_ptr, std::shared_ptr (And std::weak_ptr)
Rule Of Five (Three, Zero), And Move Semantics#
Another good thing to have is a rule to fight against C++’s shortcomings. This expains how to write copyable and movable types, likewise.
Perfect Forwarding, only to show that this is a different concept but looks syntactically much like moving.
Multithreading, Memory Model#
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.
News From The Language#
From Concepts
News From The Library#
std::filesystem. In addition to basic functionality, show how to handle UTF-8 encoded paths (
std::filesystem::u8path
) [1]Container and algorithms overview (here). Show hash-table based data structures
std::unordered_set<>
andstd::unordered_map<>
[1].Execution Policies And Parallel Algorithms (Incomplete Draft)
std::tuple<>
[1]
C++ Executed At Compile Time (The constexpr
Engine)#
From The constexpr Engine
Footnotes