While reading an article, I came across the following syntax:
template <typename T>
class MyTemplate
{
T* member;
T* method();
// ...
}
class MyClass : public MyTemplate<MyClass>
{
// ...
}
I don't exactly understand how MyClass
can inherit from a template that's based on itself. Could you please explain how this works?