Your Library
Chapter 8 · Concepts and generic programmingConstraints, variadic templates, and compile-time checking
Contents
Chapter 7Sections 8.1–8.6

Concepts and generic programming

Constraints, variadic templates, and compile-time checking

Templates let algorithms work with many types, but each algorithm still has requirements. This chapter makes those requirements explicit with C++20 concepts, then applies generic programming to ranges, parameter packs, folds, forwarding, and template compilation.

In this chapter

  1. 7.1Lesson 8: Concepts and Generic Programming