http://llvm.org/bugs/show_bug.cgi?id=8326
Summary: const union member in template class gives invalid
error
Product: clang
Version: 2.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=5583)
--> (http://llvm.org/bugs/attachment.cgi?id=5583)
test case
const_union_member.cpp:5:3: error: constructor for 'Foo<int>' must explicitly
initialize the const member ''
Foo()
^
const_union_member.cpp:21:12: note: in instantiation of member function
'Foo<int>::Foo' requested here
Foo<int> baz;
^
const_union_member.cpp:11:9: note: '' declared here
const union {
Both gcc and msvc accepts the code, and no error is generated if const or
template is dropped.
--
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