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++/70142] New: Class members not in scope in exception-specification


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70142

            Bug ID: 70142
           Summary: Class members not in scope in exception-specification
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

The following code fails to compile, with an error about y not being in scope:

struct X {
    X() noexcept(noexcept(y+1)) { }
    int y;
};

int main() { }

However, [basic.scope.class]/1 says that the scope of class members includes
exception-specifications.

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