https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112273
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-10-29 Summary|gcc crashs when checking |gcc crashs when checking |satisfaction a constraint |satisfaction a constraint |of lambda function |of lambda function and | |using decltype of a | |variable argument template Status|UNCONFIRMED |NEW Keywords| |c++-lambda Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, slightly reduced/changed: ``` template <class... Ts> struct Tp {}; template <class T> struct make_delayed { static constexpr inline bool value = true; }; template <class T> concept K = make_delayed<T>::value; template<typename ...t> constexpr auto ice(t... arg) { using Tp_t = Tp<decltype(arg)...>; return []() requires K<Tp_t> { return 1; }; }; int main() { constexpr auto l = ice(1); static_assert(l() == 1); return 0; } ``` If I replace `decltype(arg)` with `t`, GCC no longer ICEs. This is why I moved away from using auto here to show a case where it is working correctly.