I am trying to do a forward declaration of a struct in c++ that has a typename. Something like this is entirely valid:
typedef struct foo foo;
struct foo{
int f;
};
My struct just instead has a typename, so I tried this:
template <typename T>
typedef struct mV<T> mV;
template <typename T>
struct mV{
//contents of struct
};
However, I then get the errors a typedef cannot be a template
, explicit specialization of undeclared template struct
and redefinition of 'mV' as different kind of symbol
. How can I go about fixing that?