1 2 3 4 5 6 7 8
template <typename T> struct Base { }; struct Derived : Base<Derived> { // I love the smell of CRTP in the morning Derived(); }; Derived::Derived() : Base() {};
1 2 3
t.cpp: In constructor 'Derived::Derived()': Line 8: error: class 'Derived' does not have any field named 'Base' compilation terminated due to -Wfatal-errors.