Home > Back-end >  C template problem
C template problem

Time:01-07

Why can a derived class to class template as a base class instantiation type parameters?

CodePudding user response:

Maybe I didn't quite understand what you mean,
Probably you mean derived class as the base class template parameter?
Should be the template parameters with inheritance and it doesn't matter, and the template is set compile time, it just says his template parameter is a type

CodePudding user response:

Actually it is just because of the "regulations"
As long as meet the definition of "don't need to know a certain type", the grammar can be set up,
In fact, this feature is not designed, is unearthed, the pioneer in c + +
  • Related