http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694
Bug ID: 57694 Summary: [c++11] constexpr constructor do not work with const address of own member Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lts-rudolph at gmx dot de The following code results in error: field initializer is not constant class A { private: int a; const int* const aptr; public: constexpr A( int _a): a(_a) , aptr( &a) // why aptr could not be initialized? {} }; class Data { } d1; class B { private: Data* dptr1; public: constexpr B(Data* _p): dptr1( _p) {} }; class Use { static constexpr A a{2}; // fail! error: field initializer is not constant static constexpr B b{&d1}; // works };