This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52366] New: [c++11] static constexpr function cant initialize static constexpr
- From: "trashyankes at wp dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Feb 2012 22:04:56 +0000
- Subject: [Bug c++/52366] New: [c++11] static constexpr function cant initialize static constexpr
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52366
Bug #: 52366
Summary: [c++11] static constexpr function cant initialize
static constexpr
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: trashyankes@wp.pl
gcc version 4.7.0 20120203 (experimental) (niXman build)
code:
---------------------------
---------------------------
class A
{
static constexpr int func() { return 0; }
static constexpr int i = func();
//^--- error: field initializer is not constant
};
---------------------------
---------------------------