[LLVMbugs] [Bug 14505] New: overload resolution should be ambiguous

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 4 06:49:58 PST 2012


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

             Bug #: 14505
           Summary: overload resolution should be ambiguous
           Product: clang
           Version: 3.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: alexbolz at web.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following code should not compile since the call to
func is ambiguous, but clang accepts it.

See:
http://stackoverflow.com/questions/13703186/ambiguous-overload-with-deleted-move-constructor

template<class T> struct Test {
    Test(T&) {}
    Test(T&&) = delete;
};

void func(Test<int> const&) {}
void func(Test<double> const&) {}

int main()
{
    int x = 0;
    func(x);
    return 0;
}

-- 
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