1 // PR c++/63849 2 // { dg-do compile { target c++11 } } 3 4 template <class _T, class...> 5 using First = _T; // we should not use this 6 // alias with only 7 // one pack parameter (?) 8 9 template <template <class...> class _Successor, 10 int, 11 class... _Xs> 12 struct Overlay 13 { 14 using O = _Successor<_Xs...>; 15 }; 16 17 template <class... _Pack> 18 struct List 19 { 20 template <int _s> 21 using O = typename Overlay<List, _s, _Pack...>::O; 22 23 template <template <class...> class _S> 24 using Pass = _S<_Pack...>; 25 26 template <int _i> 27 using At = typename O<_i> 28 ::template Pass<First>; 29 }; 30 31 template <int _i> 32 using At = typename List<int, char> 33 ::template At<_i>; 34 35 template <int _i> func_crash(At<_i> &)36void func_crash(At<_i>&) {} 37 main(int argc,char * argv[])38int main(int argc, char *argv[]) 39 { 40 char ccc; 41 int iii; 42 func_crash<0>(iii); 43 } 44