https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105921
--- Comment #1 from Yclept Nemo <orbisvicis+gcc at gmail dot com> --- AFAICT, the attachment includes everything needed in a bug report. Inlining the code here for convenience: #include <utility> template <typename T, int N> auto a = (struct A { template <class T1, int> using Temp = T1; template <int... I> auto get(std::index_sequence<I...>){ return (int (*)( Temp<T,N>... ))nullptr; } }){}.get(std::make_index_sequence<N>{}); int main () { a<int, 4>; }