From Template Metaprogramming to User Convenience - API Design Stories
summary
Two API fixes come from oneDPL/TBB work: first, replacing awkward braced lists with a constructor generator that uses std::array/to_array then an index_sequence trick to produce an N-length parameter pack; that ships and lets callers write ND blocked ranges with fewer braces but forces uniform types for deduction and needs static_assert guards for nicer errors. Second, CTAD for callable-backed class nodes extracts signatures via decltype(&F::operator()) and partial-specialization patterns, supports only unary non-generic callables and overloaded operators are ambiguous without a matching hint — the technique requires many const/ref/noexcept variants.
AI-written summary · about
chapters (12)
- 0:00Welcome
- 1:27Live coding setup
- 2:08Blocked range API design
- 8:34Initializer lists attempt
- 13:56C++17 index sequence
- 29:11Deduction guide challenges
- 48:18Function node API
- 51:07Function node constructor
- 1:01:09Lambda signature deduction
- 1:15:40Overloaded call operators
- 1:19:33Summary
- 1:20:59Q&A
related talks
22mAwesome API Design
01h 36mBuilding C++ Interfaces That Are Hard to Use Incorrectly
56mEfficient and Reliable Wrapping of C APIs Using Modern C++
47mAPI Design Principles
24mGenerating ergonomic C++ APIs using Rustdoc, procedural macros, and Serde
42mGood APIs don't need a tutorial
01h 01mOur Adventures With REST API in C++ : Making it Easy
01h 18mAPI design: Lessons Learned
