The Big Five of C++20


C++20 will be a significant C++20 standard. As C++11 did it, C++20 will change the way we program modern C++. This is, in particular, true for Ranges, Coroutines, Contracts, Concepts, and Modules.

The new ranges library enables it to express algorithms directly on the container, compose the algorithm with the pipe symbol and apply them onto infinite data streams.

Thanks to Coroutines asynchronous programming in C++ may become mainstream. Coroutines are the base for cooperative tasks, event loops, infinite data streams, or pipelines.

Design by contract allows you to express preconditions, postconditions, and invariants to functions, which can be verified.

Concepts will change the way we think and program templates. They are semantic categories for the valid template arguments. They enable you to express your intention directly in the type system. If something goes wrong, you will get a short error message.

Modules will overcome the restrictions of header files. They promise a lot. For example, the separation of header and source files becomes as obsolete as the preprocessor. In the end, we will also have faster build times and an easier way to build packages.

Наши контакты