http://llvm.org/bugs/show_bug.cgi?id=11157
Summary: constexpr constructors can't initialize constexpr
variables
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=7471)
--> (http://llvm.org/bugs/attachment.cgi?id=7471)
demo source code
With the attached source file, I get the following error message:
clang++ -std=c++11 -c constexpr.cc
constexpr.cc:7:13: error: constexpr variable 'a' must be initialized by a
constant expression
constexpr X a(2);
^~~~
1 error generated.
The second variable "b" which calls the default constructor gets initialized
correctly, but the "constexpr" constructor cannot be called to initialize the
variable "a".
--
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