C++ Concepts: What you should know and how to use them right

Speaker: Nicolai Josuttis

Audience level: [ Beginner | Intermediate | Advanced ]

Concepts are a pretty new key feature of C++. Introduced with C++20, they provide a way to deal with requirements and specify constraints on generic code. This can be used to improve overload resolution, avoid invalid use of generic code, improve error handling, and improve documentation of generic code.

In this talk I introduce the basics of concepts. You will get an overview of

  • The difference between requirements, concepts, and constraints
  • Where you can apply concepts
  • How to design and formulate concepts
  • What the standard library gives you as and for concepts
  • How to test concepts