C++20 Concepts

By Andreas Fertig

C++20 has been with us for some time now. Concepts are one of the big four features that can influence C++ a lot. In this talk, we will dig into what Concepts mean for our code-base.

For example, we’ll look at static vs. run-time polymorphism comparing the two worlds, investigating what we did in the past because of the lack of Concepts and how we can write code differently now.

Another improvement of Concepts is readability. Template code gets quickly hard to read and starts looking like only template experts can understand and write. On the other hand, concepts make it very easy to formulate requirements in a readable way, much like writing normal code.

But what about the speed of Concepts? Time is a very precious resource. For us developers, that means having quick turnarounds by fast compile-times is great. One promise of Concepts I often hear is improved compile-times. Let’s dig into that and see by comparison if Concepts excel in compile-time speed over generic code without templates.

By the end of the talk, attendees have learned that Concepts allow us to approach software design differently by using Concepts.