Variadic and Variable Templates in C++14
summary
C++14 features get shown through concrete code: a type-safe printline via parameter packs implemented by recursive template unpacking and a required base case, a variable-template factorial and a looser constexpr version that runs loops at compile time, a compile-time FizzBuzz built with std::index_sequence and tuples plus enable_if and static_assert tests, and a sine lookup table generated as a variable template for embedded use; examples expose compiler limits (instantiation/step caps) and demonstrate that std::apply and tuple utilities actually work.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:22Problems varying number of arguments
- 3:39Reminder: functions, templates. patterns
- 5:17Defining a variadie template function
- 20:59Example template class Sack
- 22:31template template parameters
- 23:39template variadie template parameters
- 32:34Variable Templates
- 35:00C++14 constexpr function rules
- 43:11integer sequence index sequence
- 53:03Testing the variable template version
related talks
59mCombining C++17 Features
01h 02mC++20 Templates - the next level
01h 02mBack to Basics: Templates in C++
59mCombining C++17 Features
54mModern Template Techniques
55mHow bad is meta-programming still today?
01h 05mC++11 in the Wild: Techniques from a Real Codebase
01h 10mThe Three Little Dots and the Big Bad Lambdas
