[LLVMbugs] [Bug 13367] New: Variadic templates and static member initialization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 15 05:35:33 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13367
Bug #: 13367
Summary: Variadic templates and static member initialization
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: fw at deneb.enyo.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8902
--> http://llvm.org/bugs/attachment.cgi?id=8902
crash.txt
The program below results in a crash, attached. (I don't know if this
ill-formed.)
template <unsigned N>
struct Str {
unsigned length;
char buffer[N];
};
template <char ...Args>
struct Const {
static const Str<sizeof(Args)> Data;
};
template <char ...Args>
const Str<sizeof(Args)> Const<Args...>::Data = {0, {Args...}};
template <char ...Args>
constexpr const char *
ArrayToConst()
{
return Const<Args...>::Data.buffer;
}
int
main()
{
ArrayToConst<'x', 0>();
}
--
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