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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


// 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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to