D
Daniel Mitchell
struct PrivateBase { };
struct PublicBase { };
void foo( PrivateBase ) { }
void foo( PublicBase ) { }
struct Derived : PublicBase, private PrivateBase { };
int main()
{
Derived d;
foo( d ); // ambiguous
}
Why doesn't the call to foo( d ) resolve to foo( PublicBase )? Is this
a language defect?
D.
struct PublicBase { };
void foo( PrivateBase ) { }
void foo( PublicBase ) { }
struct Derived : PublicBase, private PrivateBase { };
int main()
{
Derived d;
foo( d ); // ambiguous
}
Why doesn't the call to foo( d ) resolve to foo( PublicBase )? Is this
a language defect?
D.