Templates: CRTP

In this lesson, we will learn about curiously recurring template patterns in modern C++.

We'll cover the following...

CRTP

The acronym CRTP stands for the C++ idiom Curiously Recurring Template Pattern. CRTP is a technique in Modern C++ in which a Derived class derives from a class template Base. The key is that Base has Derived as a template argument.

Let’s have a look at an example:

template<class T>
...
Access this course and 1400+ top-rated courses and projects.