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