[LLVMbugs] [Bug 16947] New: Diagnose local class with template member
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 20 15:09:55 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16947
Bug ID: 16947
Summary: Diagnose local class with template member
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang does not diagnose a local class with a template member.
gcc does.
$ cat test.cpp
int test() {
class A {
template<typename T> class B {
T t;
};
};
return 0;
}
$ clang -c test.cpp
$ gcc -c test.cpp
test.cpp: In function 'int test()':
test.cpp:3:5: error: invalid declaration of member template in local class
$
[temp.mem]p2 seems clear: "A local class shall not have member templates."
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130820/cbcc523c/attachment.html>
More information about the llvm-bugs
mailing list