The curiously recurring template pattern (CRTP) is an idiom, originally in C++, in which a class X
derives from a class template instantiation using X
itself as a template argument.[1] More generally it is known as F-bound polymorphism, and it is a form of F-bounded quantification.