template<class T>
class TBase
{
public:
typedef int Int;
struct TItem
{
T Data;
};
int value;
};
template<class T>
class TClass:public TBase<T>
{
public:
TBase<T>::TItem item;
void func()
{
TBase<T>::value ++;
}
};
int main(int argc, char *argv[])
{
TClass<int> obj;
return 0;
}
In the VC compiler and Borland C ++, both can compile it. But gcc cannot compile it, because it uses it twice to work with templates. VC or BCB do not care about an unknown template name. Is there any way to suppress this gcc function? Thank!
source
share