Closed as not planned
Description
Bugzilla Link | 30594 |
Version | trunk |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor |
Extended Description
The following should be considered ambiguous:
//no error - incorrect behavior
struct B1{void operator()(){}};
struct B2{void operator()(int){}};
struct D:B1,B2{};
int main()
{
D{}();
}
without an explicit using declaration in D the overloads provided by the two bases should be considered ambiguous as in the analogous case for member functions.
//error: member 'f' found in multiple base classes of different types - correct
//behavior
struct B1{void f(){}};
struct B2{void f(int){}};
struct D:B1,B2{};
int main()
{
D{}.f();
}