"not delcared in this scope" when subclassing a template

John (Eljay) Love-Jensen eljay@adobe.com
Tue Feb 24 02:44:00 GMT 2009


Hi Alexei,

C++ (which GCC's g++ tries to be compliant)  does not know if the code is referring to Base's elems, or some global elems.

So it gives an error, as required per C++ ISO 14882.

You can get around that error by doing:
this->elems

That will tell GCC's g++ where to look for the elems identifier.

HTH,
--Eljay



More information about the Gcc-help mailing list