Talking to Typelists
summary
Demonstrates how legacy typelist meta‑algorithms get reused for modern variadic type and index sequences by automatically translating formats, predicates, and comparators via alias templates so existing algorithms like partition and set_intersection work on index sequences too. Uses alias templates and an index_to_type adaptor to convert index sequences ↔ type sequences, converts index predicates into type predicates, and generates index versions of algorithms (e.g. sort_is). Implementation compiles and runs at compile time; source and slides are on the CppCon2018 GitHub.
AI-written summary · about
chapters (16)
- 0:00Introduction and background
- 1:05What are typelists
- 3:17Typelist basics and history
- 5:25Modern typelists with variadic templates
- 7:12Typelist algorithms like partition
- 8:40Type sequences vs typelists
- 11:30Set intersection for type sequences
- 14:51Converting integers to types
- 16:00Index sequences and typelists
- 18:29Predicates and comparators
- 21:44Converting index sequences
- 23:30Compile-time parsing with index sequences
- 24:57Benefits of templated usings
- 26:26Challenge for template lists
- 27:08Godel numbering in C++ types
- 28:57Conclusion and resources
related talks
05mImprove Compile Time With One Weird Trick Template Meta Programmers Hate!
01h 01mRethinking the Way We Do Templates in C++
50mExpression Templates: Past, Present, Future
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 14mReintroduction to Generic Programming for C++ Engineers
13mA Simpler Encoding of Indexed Types
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
43m“Variadic expansion in examples"
