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: [email protected]
ReportedBy: [email protected]
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
};
---------------------------
---------------------------