Generic Programming with Concepts Lite, Part II
summary
Concepts Lite claims that adding named constraints to templates makes library code readable and gives precise diagnostics by checking constraints at the point of use; the proposal supplies a new requires-expression, a concept introduction shorthand and rules for overload/specialization based on logical implication, and it is implemented in a GCC branch with examples on GitHub. The talk shows concrete syntax, how diagnostics pin failing requirements, that separate checking remains unsolved, and reports improved diagnostics and faster compile-time behavior in weighted tests.
AI-written summary · about
chapters (11)
- 0:00Quick recap
- 11:01Ad hoc constraints
- 18:58Defining concepts
- 20:01Anatomy of a concept
- 30:18Template parameters
- 36:30Family concepts
- 36:48Concept introductions
- 39:20Type specifiers
- 45:57Refinement
- 54:26Type specialization hierarchy
- 57:55Questions?
related talks
01h 04mC++ Concepts
01h 01mBack to Basics: Concepts in C++
01h 11mC++20 Templates: The next level: Concepts and more
07mLightning Talk: Higher-Order Template Metaprogramming with C++23
01h 02mDiscovering a User-Facing Concept
06mLightning Talk: C++20 - A New Way of Meta-Programming?
01h 02mDiscovering a User-Facing Concept
01h 01mConcepts vs Typeclasses vs Traits vs Protocols
