cpprussia C++ Russia 2019 Msc (19.04.2019 — 20.04.2019)

Initialisation in modern C++


In this talk, we will discuss the past, present, and future of initialisation in C++, the different types of initialisation and syntaxes for them, and how to use them correctly.

Initialisation semantics is widely regarded as one of the most difficult aspects of the C++ language. We have many different kinds of initialisation and many different syntaxes for it, and they interact in complex and often surprising ways. C++11 introduced the concept of "uniform initialisation". But instead of unifying, this feature introduced even more complex rules, which were subsequently amended in C++14, C++17, and will be changed again for C++20.

In this talk, Timur will first summarise the history of initialisation in C++. He’ll then give a systematic overview over the current initialisation rules and common pitfalls and surprises. There will be some practical coding guidelines to help using those rules effectively. Finally, Timur will offer to discuss recent proposals towards making initialisation semantics in C++20 simpler and more user-friendly.