-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++11duplicateResolved as duplicateResolved as duplicate
Description
| Bugzilla Link | 11157 |
| Resolution | DUPLICATE |
| Resolved on | Oct 17, 2011 16:31 |
| Version | trunk |
| OS | Linux |
| Attachments | demo source code |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@efriedma-quic,@zygoloid |
Extended Description
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".
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++11duplicateResolved as duplicateResolved as duplicate