Book Image

C++ 20 (2a) New Features [Video]

By : Daniel Zawadzki
5 (1)
Book Image

C++ 20 (2a) New Features [Video]

5 (1)
By: Daniel Zawadzki

Overview of this book

C++ is popular for its incredible performance and suitability for operating systems, games, embedded software, and more. This course gets you up-to-date with the very latest components in C++20/C++2a so you can harness its new enhancements and get ahead of the game by leveraging its features! We cover what C++20/C++2a is and the current standardization status. We also discover some new syntactic sugars that enable you to write shorter but more powerful code. You'll learn about the new and improved ranges and iterators, explore key examples of filter stacking, and learn how ranges simplify iterator-heavy code. Crucially, you'll master how to migrate to C++20/C++2a in the easiest possible way, and why you should! C++20/C++2a brings new features to the synchronization library, including atomic smart pointers, latchers, and barriers. We review its all-new coroutines (a major concept found in other leading programming languages that simplifies writing code for parallel execution). By the end of the course, you'll use up-to-date insights into the full features of C++20/C++2a to facilitate efficient and fast coding within your own projects. The code bundle for this course is available at: https://github.com/PacktPublishing/C-20-2a-New-Features
Table of Contents (9 chapters)
Chapter 9
Other Features and Improvements
Content Locked
Section 4
constexpr Extensions
Consider problem of defining a function that can only be executed at compile time and defining a variable that can only be initialized at compile time.