The Standard Library
Get a brief overview of what the standard library of C++20 has to offer.
We'll cover the following...
std::span
A std::span represents an object that can refer to a contiguous sequence of objects. A std::span, sometimes also called a view, is never an owner. This view can be a C-array, a std::array, a pointer with a size, or a std::vector. A typical implementation of a std::span needs a pointer to its first element and a size.
The main reason for having a std::span is that a plain array will decay to a pointer if passed to a function; therefore, its size is lost. std::span automatically finds the size of an array, a std::array, or a std::vector. If you use a pointer to initialize a std::span, you have to provide the size in the constructor.
Container improvements
C++20 has many improvements regarding containers of the Standard Template Library. First of all, std::vector and ...