Название: C++ Initialization Story: A Guide Through All Initialization Options and Related C++ Areas
Автор: Bartlomiej Filipek
Издательство: Leanpub
Год: 2022-12-23
Страниц: 275
Язык: английский
Формат: pdf (true), mobi, epub
Размер: 10.3 MB
From basic syntax, constructor and destruction rules, lifetime, and template deduction. Everything you want to know about Modern C++ techniques related to initialization. C++20 included! Initialization in C++ is a hot topic! The internet is full of discussions about best practices, and there are even funny memes on that subject. The situation is not surprising, as there are more than a dozen ways to initialize a simple integer value, complex rules for the auto-type deduction, data members, and object lifetime nuances. Throughout this text, you will learn practical options to initialize various categories of variables and data members in Modern C++. More specifically, this text teaches multiple types of initialization, constructors, non-static data member initialization, inline variables, designated initializers, and more. Additionally, you’ll see the changes and new techniques from C++11 to C++20 and lots of examples to round out your understanding.