https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122253
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
FWIW here's a captureless example that we reject similarly:
export module M;
template <int> struct ic {};
template <typename T> void go(T x) {
[] { static T y; ic<y>{}; };
}
// struct A { constexpr operator int() { return 42; } };
// template void go(A);
Seems lambda-specific, using a local class is OK
