i am a new programmer in c++. and i am using templates for the first time.
i have an abstract class and another class extending it. but all the protected members of
For a name to be looked up in a dependent base class, two conditions need to be satisfied
These rules as stated in C++03 are different from the rules stated by unrevised C++98, where satisfying the second bullet (making a name dependent) was sufficient for finding names declared in dependent base classes.
A dependent name is looked up at instantiation time and a lookup other than unqualified lookup will not ignore dependent base classes. Both of these conditions need to be satisfied to find a name declared in a dependent base class, neither of them alone is sufficient. To satisfy both conditions you can use various constructs
this->p
class1::p
Both names p
are dependent and the first version uses class member access lookup and the second version uses qualified name lookup.