“Variadic expansion in examples"
summary
Covers practical parameter-pack expansion use cases and pitfalls and shows real code: uses std::integer_sequence to unpack tuples into calls, uses empty packs / enable_if idioms to hide overloads, and demonstrates the braced-init-list trick to force left-to-right evaluation so per-argument expressions run safely. Builds an in-line variant visitor by expanding a pack of lambdas into a call table (with a GCC workaround) and implements a custom variant using aligned_storage; code mostly works but GCC still requires the workaround while newer compilers emit better static init code.
AI-written summary · about
related talks
01h 31mImplementing variant Visitation Using Lambdas
01h 04mVariadic Templates in C++11 / C++14 - An Introduction
04mPutting `integer_sequence` on a diet
04mGeneralized fold expressions
32m`for_each_argument` explained and expanded
58mC++17 in Practice - The good and the ugly
05mC++20 Lambdas: Familiar Template Syntax
20mParameter Packs or How Swift Decided to Become C++
