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:

    The general interest of the masses might take the place of the insight of genius if it were allowed freedom of action.
    Denis Diderot (1713–1784)

    Reason transformed into prejudice is the worst form of prejudice, because reason is the only instrument for liberation from prejudice.
    Allan Bloom (1930–1992)