Re: "not delcared in this scope" when subclassing a template

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux