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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly improved testcase (so that it doesn't deduce void result from baz and
doesn't complain about that on y initialization).  Still ICEs.

struct A { int i; };

A
foo (auto...)
{
  return A ();
}

int
bar (auto...)
{
  return 0;
}

auto
baz (auto... t)
{
  return [=] (auto... a) { auto [... k] = foo (t..., a...); return bar (k...);
};
}

auto x = baz (1);
auto y = x (1, 2, 3);

Reply via email to