Why does the compiler not find the base class function signature? Changing foo( a1 ) to B::foo( a1 ) works.
foo( a1 )
B::foo( a1 )
Code:
class A1 ; cl
The name C::foo shadows the name B::foo. Once the compiler finds the matching foo in class C, it stops searching any further.
C::foo
B::foo
foo
You can resolve your problem by adding:
using B::foo;
to the body of class C, or by renaming the function in class B.