https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121287
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
// PR c++/121287
// { dg-do compile { target c++20 } }
template <typename _Tp, _Tp...> struct integer_sequence {};
template <long... _Idx>
using index_sequence = integer_sequence<unsigned long, _Idx...>;
template <typename> struct array {};
template <typename = void>
auto
f ()
{
using Res = decltype([]<unsigned long Idx>(index_sequence<Idx>) {
}(index_sequence<3>{}));
return []<long...>(index_sequence<>) { array<Res>{}; }({});
}
void
g ()
{
f ();
}