https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141
Bug ID: 104141 Summary: Access to private member function from requires-clause accepted Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This is invalid code: ``` class A{ static void f(); }; static_assert( requires{ !requires{ A::f(); }; } ); ``` and rejected by Clang and MSVC due to access to a private member function. But GCC accepts it. Demo: https://gcc.godbolt.org/z/76jhYav4v