https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120611
Bug ID: 120611 Summary: Name of lambda member exposed Product: gcc Version: 15.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ethanhancock at me dot com Target Milestone: --- https://godbolt.org/z/TaGbYr33r GCC accepts the following: int main() { auto l = [](){ return 42; }; return l._FUN(); } The static member _FUN is exposed and usable. This does not require instantiation of the lambda type; the following is accepted in c++20 mode: int main() { return decltype([]{return 42;})::_FUN(); }