[LLVMbugs] [Bug 7224] New: clang find const overloads ambiguous when used with a derived class.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue May 25 04:05:42 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7224
Summary: clang find const overloads ambiguous when used with a
derived class.
Product: clang
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ogoffart at kde.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
// Code extracted from phonon
class A {};
class B : public A {};
static inline int foo(A *const d)
{ return 0; }
static inline int foo(const A *const d)
{ return 1; }
int main()
{
B *const d = 0;
return foo(d);
}
/*
./main.cpp:15:12: error: call to 'foo' is ambiguous
return foo(d);
^~~
./main.cpp:6:19: note: candidate function
static inline int foo(A *const d)
^
./main.cpp:9:19: note: candidate function
static inline int foo(const A *const d)
^
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