Templating and Metaprogramming

Templates are a powerful tool in C++ that allows you to write generalized functions and classes, enabling them to depend on free parameters that are set whenever they are used. This is commonly used to create functions that can take arguments of any type as input.

With the C++11 standard, variadic templates were introduced. Variadic templates not only allows you to make typesafe variadic functions, but also enables templates to be used for metaprogramming: writing code that writes code.

Course Content

In this course, we will give an introduction to programming with C++ templates and variadic functions. Topics include:

Prerequisite

This course requires familiarity with the C++ programming language.

Duration: 2-4 hours