Bonus - Using C++20 Features

In this chapter, you will take a quick look at some of the upcoming features being added to C++20. This chapter is important because, unlike C++14 and C++17, C++20 adds several game-changing features to the language that will alter C++ forever.

It begins with an introduction to C++20 Concepts, a new mechanism for defining the requirements of any arbitrary type. C++20 Concepts promises to change how we program using templates and auto, providing a mechanism for defining what is required of a type. We will then move to C++20 Modules, a new feature that removes the need for #include, changing how we define interfaces in C++. C++ Modules is a huge change to the language, requiring a complete overhaul of the entire Standard Library as well as our build tools. Next, we will take a quick look at std::span and C++ Ranges. Finally, we will briefly cover another game-changing addition to C++20 called Coroutines.

The recipes in this chapter are as follows:

  • Looking at Concepts in C++20
  • Working with Modules in C++20
  • Introducing std::span, a new view on arrays
  • Working with Ranges in C++20
  • Learning how to use Coroutines in C++20
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset