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:

    We have left undone those things which we ought to have done; and we have done those things which we ought not to have done.
    Morning Prayer, General Confession, Book of Common Prayer (1662)

    The opera isn’t over till the fat lady sings.
    —Anonymous.

    A modern proverb along the lines of “don’t count your chickens before they’re hatched.” This form of words has no precise origin, though both Bartlett’s Familiar Quotations (16th ed., 1992)