Y
Hacker News
new
|
ask
|
show
|
jobs
by
nicolapede
2424 days ago
Curiously Recurring Template Pattern (CRTP) [0] in C++.
class Derived : public Base<Derived>
[0]
https://en.wikipedia.org/wiki/Curiously_recurring_template_p...
1 comments
snak
2424 days ago
That's awesome. I ran into this situation in C#, and looks like it is useful in some cases.
https://zpbappi.com/curiously-recurring-template-pattern-in-...
link
kmote00
2417 days ago
tl;dr: "Generally, whenever you need the derived class information in the base class, you are probably looking for CRTP."
link
https://zpbappi.com/curiously-recurring-template-pattern-in-...