I think the reason is that it really is: if you instantiate this code:
void method2()
{
static_cast<Derived*>(this)->method2();
}
where Derivedit has no implementation method2(), it will essentially be an illustrious self-recursive call. The reason is that there Derived1really exists a member function called method2, namely, inherited from the base class.
, , , method2 .
CRTP , , . , , . , .