[LLVMbugs] [Bug 6945] New: Failed template argument deduction should mention argument types
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Apr 26 16:24:30 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6945
Summary: Failed template argument deduction should mention
argument types
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jyasskin at google.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
And, ideally, say which ones failed to match the parameters.
As of r102340, std::max(different, types) produces an error message that
doesn't help the user figure out what they did wrong.
$ cat test.cc
#include <algorithm>
long foo(int arg1, long arg2) {
return std::max(arg1, arg2);
}
$ clang -c test.cc
test.cc:4:12: error: no matching function for call to 'max'
return std::max(arg1, arg2);
^~~~~~~~
In file included from test.cc:1:
In file included from /usr/include/c++/4.0.0/algorithm:64:
/usr/include/c++/4.0.0/bits/stl_algobase.h:206:5: note: candidate template
ignored: failed template argument deduction
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.0.0/bits/stl_algobase.h:248:5: note: candidate template
ignored: failed template argument deduction
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
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