Getting Started

Get introduced to the course structure to get the most out of it.

We'll cover the following

Introduction

The C++ programming language is one of the most widely used in the world, and it has been so for decades. Its success isn’t due just to the performance it provides or maybe to its ease of use, which many would argue against, but probably to its versatility. C++ is a general-purpose, multi-paradigm programming language that blends together procedural, functional, and generic programming.

Generic programming is a paradigm of writing code so that entities such as functions and classes are written in terms of types that are specified later. These generic entities are instantiated only when needed for specific types that are specified as arguments. These generic entities are known as templates in C++.

Metaprogramming is the programming technique of using templates (and constexpr functions in C++) to generate code at compile-time that is then merged with the rest of the source code for compiling a final program. Metaprogramming implies that at least an input or an output is a type.

Templates in C++ have a reputation of being “pretty horrendous,” as described in the C++ Core GuidelinesA document of dos and don’ts maintained by Bjarne Stroustrup and Herb Sutter.. However, they make generic libraries possible, such as the C++ Standard Library that C++ developers use all the time. Whether we’re writing templates ourselves or just using templates written by others (such as standard containers or algorithms), templates are most likely part of our daily code.

Press + to interact
Course content division
Course content division

This course is intended to provide a good understanding of the spectrum of templates available in C++ (from their basic syntax to concepts in C++20). This will be the focus of the first two parts of the course. The third and final part will help us put the newly acquired knowledge into practice to perform metaprogramming with templates.

Who is this course for?

This course is for beginner to intermediate C++ developers who want to learn about template metaprogramming as well as advanced C++ developers looking to get up to speed with the new C++20 features related to templates and the various idioms and patterns. Basic C++ coding experience is necessary to get started with this course.