+ 1
Can template class be inherited?
A class that has a template specifications in it can it be inherited?
3 odpowiedzi
+ 3
Yes.
template <class T>
class Base {...};
class Derived: public Base <Derived> {...};
See CRTP idiom for example.
0
please what does CRTP means ?
0
Curiously Recurring Template Pattern aka Mixin from above. Used as static polymorphism and to mix in the behavior or data into a derived class. See Wikipedia or DuckDuckGo for the more information