https://llvm.org/bugs/show_bug.cgi?id=26850
Bug ID: 26850 Summary: Lookup of operator[] succeeds when should be ambiguous Product: clang Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: barry.rev...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Consider the following reduced code example from a StackOverflow question (http://stackoverflow.com/q/35373384/2069064): struct X{}; struct Y{}; struct B { void operator[](X){} }; struct C { void operator[](Y){} }; struct D : B, C {}; int main() { D d; d[Y()]; } The call to D::operator[] should be ambiguous due to the two different base class overloads. A call to d.operator[](Y()) would correctly fail to compile. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs