my compiler doesn't compile the following:
struct Base1
{
virtual void F(){}
};
struct Base2
{
virtual void F(){}
};
struct Derived : public Base1, private Base2
{
}
int main()
{
Derived d;
d.F();
return 0;
}
It complains that F is ambiguous. But when I try to do
d.Base2::F();
it notices that Base2 is private and hence inaccessible. Is my compiler
broken in this regard? I know I can use 'using base1::F()' in my derived
class, or 'd.Base1::F()' in main(), but it surprises me that I have to.