Skip to content

Glossary: C++ Beyond the Basics

Requires expression

Also written: requires

A `requires(const T& t) { ... }` block listing code that must compile for a type. It's how `Priced` demands a `cents()` member.

Where the book teaches it

Related terms

ConceptConstraint