Discovering a User-Facing Concept
summary
Claims that concepts must be discovered from algorithms rather than types and demonstrates the process by deriving a ranges left-fold and a ranges reduce with loop unrolling, using std::invoke, sentinels, random access iterators and decay-result typing. Presents detailed requirements: syntax constraints, semantic axioms and complexity bounds, packages them into a readable detail concept (e.g. indirectly_left_foldable) and promotes a semigroup/magma abstraction. Shows loop unrolling can speed GCC but hurt Clang, so benchmarks are required; the implementation works but needs careful testing.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 13:00Generic programming
- 13:25Do I need a math background
- 14:12What is a concept
- 18:09Left Folds
- 21:08Normalize
- 24:17Improvements
- 28:10New Use Case
- 30:22New Expressions
- 38:52In iterative requirements
- 40:40New operation applications
- 43:58Domain of definition
- 45:51Semantic requirements
- 48:24Magma
- 51:58Associativity
- 52:55Semigroup
- 54:55Questions
related talks
01h 02mDiscovering a User-Facing Concept
01h 11mConcepts in 60: Everything you need to know and nothing you don't
58mConcept Based Testing
04mConcepts in 5
01h 04mC++ Concepts
01h 05mGeneric Programming with Concepts Lite, Part II
58mGeneric Programming with Concepts Lite, Part I
59mHow to Implement the C++ Standard Library (Part 2): An Excursion into libc++
