consider the following class template:
template
class MyClass
{
void MyFunc();
};
template
void MyClass::MyFunc()
{
What you're doing is fine, try this out:
template
struct Structure
{
S s ;
T t ;
} ;
int main(int argc, const char * argv[])
{
Structure ss ;
ss.s = 200 ;
ss.t = 5.4 ;
return 1;
}
This code works. If you're getting strange errors, see if you forward declared Structure
using only 1 template parameter (that's what I was doing).