[LLVMbugs] [Bug 8477] New: "overloaded operator '[]' is ambiguous" error, probably false

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 27 08:25:40 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8477

           Summary: "overloaded operator '[]' is ambiguous" error,
                    probably false
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: d235j.1 at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The attached reduced testcase triggers this error. As far as I can tell, this
should not happen. GCC and VC++ don't trigger it.

Error:


tmptst1.cpp:11:12: error: use of overloaded operator '[]' is ambiguous
        return foo[0] == 0;
               ~~~^~
tmptst1.cpp:11:12: note: built-in candidate operator[](const char *, long)
tmptst1.cpp:11:12: note: built-in candidate operator[](long, const char *)
tmptst1.cpp:11:12: note: built-in candidate operator[](const restrict char *,
long)
tmptst1.cpp:11:12: note: built-in candidate operator[](long, const restrict
char *)
tmptst1.cpp:11:12: note: built-in candidate operator[](const volatile char *,
long)
tmptst1.cpp:11:12: note: built-in candidate operator[](long, const volatile
char *)
tmptst1.cpp:11:12: note: built-in candidate operator[](const volatile restrict
char *, long)
tmptst1.cpp:11:12: note: built-in candidate operator[](long, const volatile
restrict char *)
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list