Discovering a User-Facing Concept
summary
Claims that concepts are discovered by analyzing algorithms and demonstrates deriving a user-facing semigroup from a range-based left fold, building layered detail concepts like indirectly_left_foldable and using C++20 concepts (input iterator, sentinel, regular_invocable) to express exact requirements. Shows a hand-unrolled reduction (reduce) to exploit instruction-level parallelism, benchmarks vs gcc/clang that produce surprising regressions, and emphasizes keeping heavy requirements internal while documenting them and always benchmarking optimizations.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:30Why this talk
- 3:13Algorithm definition
- 4:52Types
- 7:27Generic Programming Abstract Algebra
- 10:29Concept Definition
- 11:46Concept Design
- 13:05Use Cases
- 15:53Normalize Code
- 24:04New Use Case
- 27:03New Expressions
- 29:41Questions
- 31:25Loop unrolling
- 36:47New iterator requirements
- 41:32What is an operation
- 42:11Domain of definition
- 46:34Magma
- 52:05Formal Mathematical Definition
- 52:37Semigroup
- 56:00Epilogue
related talks
01h 02mDiscovering a User-Facing Concept
01h 05mGeneric Programming with Concepts Lite, Part II
01h 01mBack to Basics: Concepts in C++
58mGeneric Programming with Concepts Lite, Part I
01h 04mC++ Concepts
07mLightning Talk: Higher-Order Template Metaprogramming with C++23
54mA Tour of C++ Recognised User Type Categories
01h 03mTemplates Made Easy with C++20
