CRTP
Let's learn about CRTP in this lesson.
We'll cover the following...
CRTP
The acronym CRTP stands for the C++ idiom Curiously Recurring Template Pattern and is a technique in 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>
class Base{
...
};
class Derived:
...