[LLVMbugs] [Bug 12668] New: Non-const template argument diagnostics not helpful
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 25 18:21:31 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12668
Bug #: 12668
Summary: Non-const template argument diagnostics not helpful
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: llvm-bugs at quasiparticle.net
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Given this code, clang++ should diagnose that 'x' is not a constant, and thus
can't be used as a template argument.
template<int I>
void foo()
{
int x = I;
foo<x>();
}
This actually results in
"error: no matching member function for call to 'foo'"
with a final notice of
"note: candidate template ignored: invalid explicitly-specified argument for
template parameter 'I'".
--
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