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 grown literally afraid to be poor. We despise anyone who elects to be poor in order to simplify and save his inner life. If he does not join the general scramble and pant with the money-making street, we deem him spiritless and lacking in ambition.
    William James (1842–1910)

    Human development is a form of chronological unfairness, since late-comers are able to profit by the labors of their predecessors without paying the same price.
    Alexander Herzen (1812–1870)