{"product_id":"c-initialization-story-a-guide-through-all-initialization-options-and-related-c-areas-paperback","title":"C++ Initialization Story: A Guide Through All Initialization Options and Related C++ Areas - Paperback","description":"\u003cdiv\u003e\u003cp style=\"text-align: right;\"\u003e\u003ca href=\"https:\/\/reportcopyrightinfringement.com\/\" target=\"_blank\" rel=\"nofollow\"\u003e\u003cb\u003eReport copyright infringement\u003c\/b\u003e\u003c\/a\u003e\u003c\/p\u003e\u003c\/div\u003e\u003cp\u003eby \u003cb\u003eBartlomiej Filipek\u003c\/b\u003e (Author)\u003c\/p\u003e\u003cp\u003e\u003c\/p\u003e\u003cp\u003eInitialization 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.\u003c\/p\u003e\u003cp\u003eAnd here comes the book.\u003c\/p\u003e\u003cp\u003eThroughout 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.\u003c\/p\u003e\u003cp\u003eLearn C++ from the perspective of C++ Initialization! \u003c\/p\u003e\u003cp\u003e\u003c\/p\u003eThe goal of this book is to equip you with the following knowledge: \u003cul\u003e\n\u003cli\u003eExplain rules about object initialization, including regular variables, data members, and non-local objects.\u003c\/li\u003e\n\u003cli\u003eHow to implement special member functions (constructors, destructors, copy\/move operations) and when they are helpful.\u003c\/li\u003e\n\u003cli\u003eHow to efficiently initialize non-static data members using C++11 features like non-static data member initialization, inheriting, and delegating constructors.\u003c\/li\u003e\n\u003cli\u003eHow to streamline working with static variables and static data members with inline variables from C++17.\u003c\/li\u003e\n\u003cli\u003eHow to work with container-like members, non-copyable data members (like  const  data members) or move-able only data members, or even lambdas.\u003c\/li\u003e\n\u003cli\u003eWhat is an aggregate, and how to create such objects with designated initializers from C++20.\u003c\/li\u003e\n\u003c\/ul\u003eThe book contains 14 chapters in the following structure: \u003cul\u003e\n\u003cli\u003eChapters 1 to 5 create a foundation for the rest of the book. They cover basic initialization rules, constructors, destructors, and the basics of data members.\u003c\/li\u003e\n\u003cli\u003eChapter 6 is a short quiz on constructors. You can check your knowledge from the first \"part\" of the book.\u003c\/li\u003e\n\u003cli\u003eChapter 7 on Type deduction - auto, decltype, AAA and more.\u003c\/li\u003e\n\u003cli\u003eChapter 8 describes Non-static Data Member Initialization (NSDMI), a powerful feature from C++11 that improves how we work with data members. At the end of the chapter, you can solve a few exercises.\u003c\/li\u003e\n\u003cli\u003eChapter 9 discusses how to initialize container-like data members.\u003c\/li\u003e\n\u003cli\u003eChapter 10 contains information about non-regular data members and how to handle them in a class. You'll learn about const data members, unique_ptr as a data member, and references.\u003c\/li\u003e\n\u003cli\u003eChapter 11 describes static non-local variables, static objects, various storage duration options, inline variables from C++17, and constinit from C++20.\u003c\/li\u003e\n\u003cli\u003eChapter 12 moves to C++20 and describes Designated Initializers, a handy feature based on similar thing from the C language.\u003c\/li\u003e\n\u003cli\u003eChapter 13 shows various techniques like passing strings into constructors, strong typing, CRTP class counter, Copy and swap idiom, self-registering types more.\u003c\/li\u003e\n\u003cli\u003eChapter 14 is the final quiz with questions from the whole book.\u003c\/li\u003e\n\u003c\/ul\u003eAnd there are two appendices: \u003cul\u003e\n\u003cli\u003ea handy guide about rules for compiler-generated special member functions.\u003c\/li\u003e\n\u003cli\u003eanswers to quizzes and exercises.\u003c\/li\u003e\n\u003c\/ul\u003e\u003cp\u003eMost sections are completed, but I'm still working on filling two chapters and polishing the quality.\u003c\/p\u003e\u003cb\u003eWho is this book for?\u003c\/b\u003e\u003cp\u003eThe book is intended for beginner\/intermediate C++ programmers who want to learn various aspects of initialization in Modern C++ (from C++11 to C++20).\u003c\/p\u003e\u003cp\u003eYou should know at least some of the basics of creating and using custom classes.\u003c\/p\u003e\u003cp\u003eThis text is also helpful for experienced programmers who know older C++ standards and want to move into C++17\/C++20\u003c\/p\u003e\n            \u003cdiv\u003e\n\u003cstrong\u003eNumber of Pages:\u003c\/strong\u003e 296\u003c\/div\u003e\n            \u003cdiv\u003e\n\u003cstrong\u003eDimensions:\u003c\/strong\u003e 0.62 x 9.25 x 7.5 IN\u003c\/div\u003e\n            \u003cdiv\u003e\n\u003cstrong\u003ePublication Date:\u003c\/strong\u003e February 26, 2023\u003c\/div\u003e\n            ","brand":"BooksCloud","offers":[{"title":"Default Title","offer_id":52492153454899,"sku":"9798371581426","price":39.38,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0300\/5595\/6612\/files\/cHNoTjBBd3VJUm0rb3RsOEU5SnhMdz09.webp?v=1759928353","url":"https:\/\/www.vysn.com\/en-ca\/products\/c-initialization-story-a-guide-through-all-initialization-options-and-related-c-areas-paperback","provider":"VYSN","version":"1.0","type":"link"}