From Jason Turner
Watch on YouTube

Summary

This episode provides an introduction to variadic templates in C++11, showing how they allow functions to accept an arbitrary number of parameters of different types. Jason demonstrates two approaches to implementing variadic templates: the classic recursive template instantiation pattern and a more efficient approach using initializer lists. He compares the two implementations in terms of code complexity, compile time, and executable size, highlighting how the initializer list approach significantly reduces overhead compared to recursive instantiation patterns.

Resources

Tags