This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52315] [C++11] constexpr object of nested class
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2012 22:44:01 +0000
- Subject: [Bug c++/52315] [C++11] constexpr object of nested class
- Auto-submitted: auto-generated
- References: <bug-52315-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52315
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-02-20 22:44:01 UTC ---
3.3.7: 1) The potential scope of a name declared in a class consists not only
of the declarative region following the nameâs point of declaration, but also
of all function bodies, brace-or-equal-initializers of non-static data members,
and default arguments in that class (including such things in nested classes).
So within B::value, A::stuff is in scope, so we need to wait until A is
complete to parse B::value, so B::value can't be used in constant expressions
in A.