C++: News Until C++20 (2025-05-14 - 2050-05-15)

Day 1

Lambda

There was some controversy among the audience about the usage of lambda in their code, so I tried to demystify it right at the beginning.

Concepts (a.k.a. “Template error messages are a PITA”)

Definitely new in C++20, concepts are there to bring better C++ template error messages to the world.

constexpr, and the C++20 consteval and constinit

C++20 has a ton of new keywords, all building upon the constexpr capability of modern C++.

The Spaceship Operator

Created to bring some order to the ordering operators <, >, <=, >=, ==, !=, the spaceship operator brings disorder at first sight (P1185R2).

Day 2

The bigger part of the second day was dedicated to multithreading. This is good thing because there’s a lot to be said and known.

The remaining time was used to somehow shutdown the course looking over less relevant topics in a frontal way.

Local variables in if and for statements

Attributes

Ranges