About C++
1. Historical Context
C++20 is the next big C++ standard after C++11. Like C++11, C++20 changes the way we program in modern C++. This change mainly results from the addition of Concepts, Modules, Ranges, and Coroutines to the language. To understand this next big step in the evolution of C++, let me write a few words about the historical context of C++20.
C++ History
C++ is about 40 years old. Here is a brief overview of what has changed in the previous years.
1.1 C++98
At the end of the 80’s, Bjarne Stroustrup and Margaret A. Ellis wrote their famous book Annotated C++ Reference Manual (ARM). This book served two purposes, to define the functionality of C++ in a world with many implementations, and to provide the basis for the first C++ standard C++98 (ISO/IEC 14882). Some of the essential features of C++98 were: templates, the Standard Template Library (STL) with its containers, and algorithms, strings, and IO streams.
1.2 C++03
With C++03 (14882:2003), C++98 received a technical correction, so small that there is no place on the timeline above. In the community, C++03, which includes C++98, is called legacy C++.
1.3 TR1
In 2005, something exciting happened. The so-called Technical Teport 1 (TR1) was published. TR1 was a big step toward C++11 and, therefore, towards Modern C++. TR1 (TR 19768) is based on the Boost project, which was founded by members of the C++ standardization committee. TR1 had 13 libraries that were destined to become part of the C++11 standard. For example, the regular expression library, the random number library, smart pointers and hashtables. Only the so-called special mathematical functions had to wait until C++17.
1.4 C++11
We call the C++11 standard Modern C++. The name Modern C++ is also used for C++14 and C++17. C++11 introduced many features that fundamentally changed the way we program in C++. For example, C++11 had the additions of TR1, but also move semantics, perfect forwarding, variadic templates, and constexpr
. But that was not all. With C++11, we also got, for the first time, a memory model as the fundamental basis of threading and the standardization of a threading API.
1.5 C++14
C++14 is a small C++ standard. It brought read-writer locks, generalized lambdas, and extended constexpr
functions.
1.6 C++17
C++17 is neither a big nor a small C++ standard. It has two outstanding features: the parallel STL and the standardized filesystem API. About 80 algorithms of the Standard Template Library can be executed in parallel or vectorized. As with C++11, the boost libraries were highly influential for C++17. Boost provided the filesystem library and new data types: std::string_view
, std::optional
, std::variant
, and std::any
.