I have a template class defined as follow :
template <class T1, class T2>
class MyClass { };
In this class, I need a struct that contains one member of type T1. How can I do that ?
I tried the following, but it didn't work :
template <class T1, class T2>
class MyClass {
typedef struct {
T1 templateMember;
// rest of members
} myStruct;
// rest of class definition
};
EDIT: As requested, I use VS2008 and get the following error :
'MyClass<T1,T2>::myStruct' uses undefined class 'T1'