Content deleted Content added
Mx. Granger (talk | contribs) {{C++ programming language}} |
this is no longer only a C++ idiom -- it may now be seen in .NET languages such as C# for example |
||
Line 1:
{{Short description|Software design pattern}}
{{Use dmy dates|date=December 2021}}
The '''curiously recurring template pattern''' ('''CRTP''') is an idiom, originally in [[C++]], in which a class <code>X</code> derives from a class [[Template (C++)|template]] instantiation using <code>X</code> itself as a template argument.<ref>{{cite book | first1=David | last1=Abrahams | authorlink1=David Abrahams (computer programmer) | first2=Aleksey | last2=Gurtovoy | title=C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond |publisher=Addison-Wesley | isbn=0-321-22725-5| date=January 2005 }}</ref> More generally it is known as '''F-bound polymorphism''', and it is a form of [[F-bounded quantification|''F''-bounded quantification]].
==History==
|