Explore the power and versatility of variadic templates in C++ through this comprehensive conference talk from CppNow. Delve into the intricacies of parameter pack expansion and its various applications, particularly as a code generation tool. Begin with an introduction to variadic templates, covering basic syntax and common techniques. Progress to advanced topics, including unpacking tuples into function calls using std::integer_sequence and leveraging empty packs for simplified enable_if usage. Examine practical examples demonstrating how to invoke expressions for each argument in a pack and dispatch to appropriate code versions based on runtime values. Gain insights into creating more flexible and generic C++ libraries that can easily accommodate custom user-defined types. Access accompanying slides for visual reference and deeper understanding of the concepts presented.
Overview
Syllabus
Michał Dominiak: Variadic expansion in examples
Taught by
CppNow