N
none
I have this base class:
template<typename J>
class Processor {
public:
const unsigned int Dimension = J:imension;
typedef typename J::ImageType ImageType;
Processor ();
virtual ~Processor ();
};
#endif
In a sub class I need to use the types from the base class:
template <typename J>
class SubProcessor : public Processor<J>{
public:
void test(ImageType image) {
// do stuff
}
};
But that is not possible! The base class type "ImageType" is not visible in the sub class. In the
sub class I could just do the same as in the base class:
typedef typename J::ImageType ImageType;
but what is the point of using inheritance then?
template<typename J>
class Processor {
public:
const unsigned int Dimension = J:imension;
typedef typename J::ImageType ImageType;
Processor ();
virtual ~Processor ();
};
#endif
In a sub class I need to use the types from the base class:
template <typename J>
class SubProcessor : public Processor<J>{
public:
void test(ImageType image) {
// do stuff
}
};
But that is not possible! The base class type "ImageType" is not visible in the sub class. In the
sub class I could just do the same as in the base class:
typedef typename J::ImageType ImageType;
but what is the point of using inheritance then?