Content deleted Content added
Added mention to real world (STL) use of CRTP |
|||
Line 26:
Some use cases for this pattern are [[Template metaprogramming#Static polymorphism|static polymorphism]] and other metaprogramming techniques such as those described by [[Andrei Alexandrescu]] in ''[[Modern C++ Design]]''.<ref>{{cite book | first=Andrei | last=Alexandrescu | authorlink=Andrei Alexandrescu | title=Modern C++ Design: Generic Programming and Design Patterns Applied | publisher=Addison-Wesley | isbn=0-201-70431-5 | year=2001}}</ref>
It also figures prominently in the C++ implementation of the [[Data, Context, and Interaction]] paradigm.<ref>{{cite book | first1=James | last1=Coplien | authorlink1=James Coplien | first2=Gertrud | last2=Bjørnvig | title=Lean Architecture: for agile software development | publisher=Wiley | isbn=978-0-470-68420-7 | year=2010}}</ref>
In addition, CRTP is used by the C++ standard library to implement the <code>std::enable_shared_from_this</code> functionality.<ref>{{cite web |title=std::enable_shared_from_this |url=https://en.cppreference.com/w/cpp/memory/enable_shared_from_this |access-date=22 November 2022}}</ref>
== Static polymorphism ==
|