This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: "not delcared in this scope" when subclassing a template
Hi Alexei,
> You can get around that error by doing:
> this->elems
another possibility would be to add a using-declaration - especially, if
you are using "elems" more than once in the derived class
template<class A>
class Derived: public Base<typename A::value_type> {
using Base<typename A::value_type>::elems;
void Test() {
if (elems) {
}
}
};
HTH,
Axel