https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94489

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Likely still invalid, but it compiles without errors with the patch above.

template <typename, unsigned> struct S { };
template <typename T, unsigned N> using U = S<T, __integer_pack(N)...>;
template <typename T> constexpr long g(T) { return 1l; }
template<typename T, typename TT = U<T, g(T{})>> struct X { };

template<typename T>
auto foo(T)
{
  []<unsigned>() {
      foo(1);
      X<T> x;
  };
}

Reply via email to