模板类的继承

template <class T1> class BaseT { BaseT(); } template <class T1> BaseT<T1>::BaseT() { }; template<class T2> class InheritT : public BaseT<class T2> { InheritT(); } template<class T2> InheritT<T2>::InheritT:BaseT<T2>() { } class CInherit: public BaseT<int> { CInherit(); } CInherit::CInherit:BaseT<int>() { }

你可能感兴趣的:(Class)