M
Michael Lehn
I want to use the "Barton Nackman trick" for my matrix hierarchy. But I ran
into a problem with a typedef I need in the base class:
template <typename E>
class Matrix
{
public:
typedef typename E::TT TT;
};
template <typename T>
class DenseMatrix : public Matrix<DenseMatrix<T> >
{
public:
typedef T TT;
};
this gives the error: no type named `TT' in `class DenseMatrix<double>'
Is there a chance to solve this problem, or is it even a comipler problem?
I think the approach is pretty useless if this doesn't work. Most (or even
all) methods in the base class will depend on the parameter "E::TT".
into a problem with a typedef I need in the base class:
template <typename E>
class Matrix
{
public:
typedef typename E::TT TT;
};
template <typename T>
class DenseMatrix : public Matrix<DenseMatrix<T> >
{
public:
typedef T TT;
};
this gives the error: no type named `TT' in `class DenseMatrix<double>'
Is there a chance to solve this problem, or is it even a comipler problem?
I think the approach is pretty useless if this doesn't work. Most (or even
all) methods in the base class will depend on the parameter "E::TT".