This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51373] [C++0x] ICE for static pointer to member initialized in-class
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Dec 2011 19:33:55 +0000
- Subject: [Bug c++/51373] [C++0x] ICE for static pointer to member initialized in-class
- Auto-submitted: auto-generated
- References: <bug-51373-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51373
--- Comment #2 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2011-12-03 19:33:55 UTC ---
(In reply to comment #1)
> Even with the constexpr specifier that declaration should be ill-formed,
> because the class definition must be complete for an in-class static data
> member initializer.
I just recognize that the class definition must not be complete to make the
pointer of member formation a constant expression. So, the code of the first
example should be well-formed after addition of constexpr to the static data
member.