Exercise: CRTP-derived Class Restriction
Test your understanding of CRTP-derived class restrictions.
Problem statement
Let’s take a look at the following code. If we analyze it closely, we can see that the derived class Derived2
has Derived1
as the template parameter. Your task is to update the code to prevent a
derived class from not having itself as a template parameter.
Access this course and 1400+ top-rated courses and projects.