the Concepts of concepts
summary
Shows exactly how C++20 concepts replace ad hoc overloads and static_asserts by writing concrete constraints: builds a number concept that forbids bool/char, implements constrained functions via abbreviated function templates and requires-clauses, and models class constraints with a car/convertible example and a clonable nested-requires case that catches a copy‑paste bug. Demonstrates compiler behavior (improved error messages, subsumption rules, negation pitfalls), uses standard concepts from the library, and shows which examples compile and which are ambiguous.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:06Agenda
- 0:51Why Do We Need Something like Concepts
- 15:16Trailing Requires Close
- 21:22Abbreviated Function Templates
- 31:10Combining Concept
- 36:58How To Find the Most Constrained Constraint
- 42:10Wishful Writing
- 43:13Compound Requirements
- 46:00Nested Template Specializations
- 51:34Examples
- 54:01Utility Functions
- 54:11Template Parameters
- 57:49Conclusion
- 58:44Call to Action
related talks
56mConcepts - Evolution or Revolution
59mConcepts driven design
12mGood Concepts
53mFrom C++ Templates to C++ Concepts - Metaprogramming: an Amazing Journey
01h 00mC++ Concepts and Ranges
01h 05mBack To Basics: Overload Resolution
01h 01mDocumentation in the Era of Concepts and Ranges
01h 01mUsing Modern C++ to Eliminate Virtual Functions
