In the below Example,
void f(double, double); // at global scope
struct Grandparent {
void f(int);
void f(double, double);
};
struct Parent : public Grandparent {
void f(int); // hides all overloads of Grandparent::f
};
struct Child : public Parent {
void g() { f(2.14, 3.17); } // resolves to Parent::f
};
How the declaration of Parent::f dominates and hides all of the more-ancestral declarations regardless of signature, that is, Parent::f(int)
dominates and hides the declaration of Grandparent::f(double, double)
even though the two member functions have very different signatures?
I came across this example via https://en.wikipedia.org/wiki/Dominance_(C%2B%2B)