Here are two template class.
template<class T>
class A{
protected:
T _data;
};
template<class T>
class B:public A<T>{
B(T data){_data=data;}
};
However, gcc the compiler complained
In constructor ‘B<T>::B(T)’:
error: ‘_data’ was not declared in this scope.
But In microsoft VS c++ compiler. It can pass. Anything wrong here? Thank you.