C++ 20 (2a) New Features

Video description

Get up to date with what's new in C++

About This Video

  • Write robust and efficient code using the latest version of C++
  • Port your C++ code to the latest version and save time and effort
  • Discover new coroutines that simplify writing code that executes in parallel

In Detail

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.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Getting Started with C++20
    1. The Course Overview 00:05:08
    2. Standardization Process of C++20 00:01:22
    3. Migrating to C++20 00:01:58
    4. How to Build Examples 00:05:15
  2. Chapter 2 : String Formatting Using New std::format
    1. Rationale for std::format 00:06:44
    2. std::format: Placeholders and Syntax 00:04:47
    3. std::format_to and std::format_to_n 00:05:36
    4. Formatting User Defined Types 00:02:00
    5. Migrating Stdio and Iostreams to std::format 00:02:29
  3. Chapter 3 : Ranges - Iterators Reinvented
    1. Rationale for Ranges 00:02:52
    2. What's New in Ranges 00:02:22
    3. Using Ranges 00:02:10
    4. Composing Ranges 00:03:46
  4. Chapter 4 : New Comparison Operator <=>
    1. Rationale Behind New Comparison Operator 00:03:40
    2. Usage of <=> Operator and How to Make Comparisons 00:03:14
    3. Rewriting and Synthetizing Expressions 00:03:35
    4. Associated Changes in Operator== 00:04:15
    5. Returning Value of the Spaceship Operator 00:03:01
  5. Chapter 5 : Modules
    1. Rationale Behind the Modules 00:02:29
    2. How to Define a Module 00:04:14
    3. Partitioning of Modules 00:03:37
    4. Compiling and Linking Modules into an Executable 00:03:02
  6. Chapter 6 : Implementing Concepts
    1. Rationale Behind Concepts 00:02:03
    2. Concepts as Compile Time Predicates 00:04:56
    3. Defining Own Concepts 00:05:14
    4. Concepts Library 00:04:42
  7. Chapter 7 : New Synchronization Library Extensions
    1. Atomic Smart Pointers 00:03:16
    2. Efficient Atomic Waiting 00:01:43
    3. Lightweight Access Coordination 00:02:23
    4. Latches and Barriers 00:04:25
  8. Chapter 8 : Coroutines
    1. The Rationale Behind Coroutines 00:02:49
    2. Concept of Splitting Execution State and the Thread of Execution 00:02:15
    3. Coroutine Anatomy 00:04:15
    4. Generator Expressions 00:04:58
    5. Example of Use 00:03:46
  9. Chapter 9 : Other Features and Improvements
    1. Using Enum 00:01:53
    2. Improvements to Lambda Expressions 00:03:35
    3. Designated Initializers 00:02:48
    4. constexpr Extensions 00:04:05
    5. Course Summary 00:02:25

Product information

  • Title: C++ 20 (2a) New Features
  • Author(s): Daniel Zawadzki
  • Release date: February 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781839216909