Suppose there is a tiny class
template<class T1>
class c {
template<class T>
class Test {
public:
typedef std::vector<T> vetor_type;
vetor_type some_var;
};
void f() {
Test<int>::vetor_type tt; //error
}
};
I get an error:
Expected ‘;’ after expression.
Edit: I don’t know why the answer about the typename was deleted, cause it actually helped.
But could someone explain why do i have to use typename if I’m writing this code inside another class template?
Test<T>is dependent on the type used to instantiatec<T1>with so you need to usetypenamein the definition withinfoo().