模板类继承需要注意以下两点:
如果子类是模板类,则必须指定父类的模板类型,以便为特定类型指定父类的模板类型,或者在子类的统称中指定父类。 templatetypenametclassparent { public : parent (TP ) { this-p=p; } private: T p; (; //如果子类不是模板类,则为父类的具体类型classchildone : publicparentint { public 3360 child one (inta,int b ) :Parent(b ) (; //如果子类是模板类,则为父类templatetypenametclasschildtwo : publicparentt { public 3360 child two (ta,T b ) :ParentT(b (; 如何调用模板的父类的方法https://blog.csdn.net/oooooo 12345 re/article/details/51218449