The following seems to be a GCC bug, it compiles fine in MSVC, but doesn't
compile in GCC and MinGW
```
template<typename T>
struct A
{
int numElements;
T* elements;
};
template<typename T>
class B : public A<T>
{
B(int newNumElements)
{
numElements = newNumElements; // This fails with error.. 'numElements'
was not declared in this scope;
elements = new T[numElements]; // This too but with 'elements' instead
of 'numElements'
}
~B()
{
if(numElements > 0) // And so on here
{
delete[] elements; // And here
}
}
};
int main()
{
B b(5);
return 0;
}
```
Is this a bug?
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public