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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So as testcase e.g.
template <int I, typename... T>
struct A {
  using B = T...[I];
  A () requires (requires { B {}; }) {}
};

template <int I, auto... J>
struct C {
  using B = decltype (J...[I]);
  C () requires (requires { B {}; }) {}
};

template <int I, auto... J>
decltype (J...[I]) foo () { return 0; }

template <int I, typename... T>
T...[I] bar () { return 0; }

template <int I, typename... T>
using D = T...[I];

template <int I, typename... T>
void baz (D <I, int, T...>) {}

void
qux ()
{
  A <3, int, long, short, int> a;
  C <2, 0, 0LL, 0U, 0L> c;
  foo <0, 1> ();
  foo <2, 1U, 2L, 3LL, 4.0> ();
  bar <0, int> ();
  bar <3, unsigned, long, long long, double> ();
  baz <0, int> ();
}
?

Reply via email to