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 seen over and over that white male historians in general have tended to dismiss any history they didn’t themselves write, on the grounds that it is unserious, unscholarly, a fad, too “political,” “merely” oral and thus unreliable.
    Adrienne Rich (b. 1929)

    Whoever denies that he possesses vanity generally possesses it in so brutal a form that he instinctively shuts his eyes in its presence, so as not to have to look down upon himself.
    Friedrich Nietzsche (1844–1900)