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:

    It has been an unchallengeable American doctrine that cranberry sauce, a pink goo with overtones of sugared tomatoes, is a delectable necessity of the Thanksgiving board and that turkey is uneatable without it.... There are some things in every country that you must be born to endure; and another hundred years of general satisfaction with Americans and America could not reconcile this expatriate to cranberry sauce, peanut butter, and drum majorettes.
    Alistair Cooke (b. 1908)

    But as to women, who can penetrate
    The real sufferings of their she condition?
    Man’s very sympathy with their estate
    Has much of selfishness and more suspicion.
    Their love, their virtue, beauty, education,
    But form good housekeepers, to breed a nation.
    George Gordon Noel Byron (1788–1824)