https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90725
Bug ID: 90725 Summary: implicitly used 'this' not diagnosed in static member fn declaration Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- struct S { int a; static int foo() noexcept(noexcept(a)); }; is compiled fine, but 'this' cannot be used in a static member function declaration. This one we handle ok: struct S2 { int a; static int foo() noexcept(noexcept(this->a)); };