[LLVMbugs] [Bug 19010] New: Empty base of class with trivial default constructor is not initialized in constant expression
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 28 12:49:35 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=19010
Bug ID: 19010
Summary: Empty base of class with trivial default constructor
is not initialized in constant expression
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: st at quanttec.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
The trunk version of clang fails to compile the following test:
struct Empty {};
struct Empty2 : Empty {};
struct Test : Empty2 {
constexpr Test() {}
};
void test() {
constexpr Test t;
}
> clang++ --std=c++1y test.cpp
test.cpp:10:18: error: constexpr variable 't' must be initialized by a constant
expression
constexpr Test t;
^
test.cpp:10:18: note: subobject of type 'Empty' is not initialized
1 error generated.
--
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/20140228/b5f5d2fa/attachment.html>
More information about the llvm-bugs
mailing list