This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52315] [C++11] constexpr object of nested class


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]