the Concepts of concepts
summary
Explains that C++20 concepts complete templates by letting code declare and enforce interface and semantic constraints at the signature level, improving diagnostics and reuse; shows four syntaxes (requires, trailing requires, constrained parameter, abbreviated function templates), uses cppinsights to inspect compilation lowering, demonstrates examples (a number concept refined to exclude bool/char, car/convertible and clonable checks that catch copy‑paste bugs, an encode utility) and warns about negation/subsumption pitfalls and that the standard supplies ~50 standard concepts.
AI-written summary · about
chapters (19)
- 0:00Start
- 0:02Agenda
- 0:34Why Do We Need Something like Concepts
- 8:22Concepts Are an Extension for Templates
- 14:59Trailing Requires Close
- 21:05Abbreviated Function Templates
- 21:38Concepts with Classes
- 27:54Semantic Requirements
- 36:41How To Find the Most Constrained Constraint
- 41:53Wishful Writing
- 42:56Compound Requirements
- 45:43Nested Template Specializations
- 46:11Type Requirement
- 46:55Requirements on the Alias Template Specializations
- 51:17Examples
- 53:44Utility Functions
- 53:54Template Parameters
- 57:32Conclusion
- 58:27Call to Action
related talks
59mConcepts driven design
56mConcepts - Evolution or Revolution
53mFrom C++ Templates to C++ Concepts - Metaprogramming: an Amazing Journey
12mGood Concepts
01h 02mBack to Basics: Templates in C++
59mBack to Basics: Generic Programming in C++
01h 01mDocumentation in the Era of Concepts and Ranges
01h 00mC++ Concepts and Ranges
