Curiously Recurring Template Pattern - General Form

General Form

// The Curiously Recurring Template Pattern (CRTP) template class Base { // methods within Base can use template to access members of Derived }; class Derived : public Base { // ... };

Some use cases for this pattern are static polymorphism, and other metaprogramming techniques such as those described by Andrei Alexandrescu in Modern C++ Design. It also figures prominently in the C++ implementation of the Data, Context and Interaction paradigm .

Read more about this topic:  Curiously Recurring Template Pattern

Famous quotes containing the words general and/or form:

    “A general is just as good or just as bad as the troops under his command make him.”
    —Douglas MacArthur (1880–1964)

    “The habits of life form the soul, and the soul forms the countenance.”
    —HonorĂ© De Balzac (1799–1850)