Access specifiers apply just like any other name when searching for a name. The fact that the function is virtual does not matter at all.
There is a common mistake that sometimes happens regarding virtual functions.
, , . , , . , " " .
struct A{
virtual void f() {}
private:
virtual void g() {}
protected:
virtual void h() {}
};
struct B : A{
private:
virtual void f() {}
};
B b;
A &ra = b;
ra.f();