Make sure each type that can be used as the template argument (MyInt
etc.) has a typedef
with a given name, such as RepresentedType
:
class MyInt : public MyType {
public:
typedef int RepresentedType;
....
};
Now you can use it in the templated class:
template<typename T>
class MyArray : public MyType {
....
T::RepresentedType * something();
};
(I hope this is what you wanted.)