In visual C++, I can do things like this:
template <class T>
class A{
protected:
T i;
};
template <class T>
class B : public A<T>{
T geti() {return i;}
};
If I try to compile this in g++, I get an error. I have to do this:
template <class T>
class B : public A<T>{
T geti() {return A<T>::i;}
};
Am I not supposed to do the former in standard C++? Or is something misconfigured with gcc that's giving me errors?