Can't access members of a Template base class within a derived template class

后端 未结 4 1899
广开言路
广开言路 2020-12-22 03:45

I have a template base class.Lets say.

template
class Base 
{
  private:
   int member1;
   char member2;
   ....
};

I de

4条回答
  •  既然无缘
    2020-12-22 04:16

    You need to prefix base member names with this-> or Base::, or add a using declaration to the class to unhide them. Their names are dependent names, and they are hidden.

提交回复
热议问题