http://llvm.org/bugs/show_bug.cgi?id=5127
Summary: Non-type template arguments not parsed correctly in
default arguments
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: parser
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
A poster on comp.std.c++ brought up a bug in GCC where the compiler doesn't
compile this code:
template<typename T, int i> struct A {};
struct B {
B(A<double, 0> arg = A<double, 0>()) {}
};
When I tried it out in Clang, I found that it won't compile it either. This is
really peculiar, since I really don't think anything is wrong with this. It
does compile if there is only one template parameter, but the comma is
apparently taken to end the argument.
--
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