When you write Parent<char>
, the compiler effectively generates a class definition as if you had substituted char
into the template text. That is, behind the scenes it's as if the parent class of CharVersion
is the following template instantiation:
class Parent_char {public: virtual char someFunction(const char& data);};
You can write your subclass just as if you were extending that class. (Of course, the name of the generated template instantiation is not Parent_char
, but that's unlikely to matter.)