template<unsigned I, typename ...Types>
struct X { };
template<typename T> struct identity { using type = T; };
template<typename T> struct add_reference;
template<typename ...Types> struct tuple { };
template<int ...Values> struct int_tuple { };
template<template<typename> class ...Templates> struct template_tuple { };
template<typename ...T> using ArrayOfN = int[sizeof...(T)];
template<typename ...Types>
void f0(X<sizeof...(Types), Types&...>) { }
template void f0(X<0>);
template void f0<int, float, double>(X<3, int&, float&, double&>);
template<typename ...Types> void f1() {}
template void f1<>();
template void f1<int>();
template void f1<int, float>();
template<typename ...Types> void f2(Types...) {}
template void f2<>();
template void f2<int>(int);
template void f2<int, float>(int, float);
template<typename ...Types> void f3(const Types *...) {}
template void f3<>();
template void f3<int>(const int*);
template void f3<int, float>(const int*, const float*);
template<typename ...Types> tuple<Types...> f4() {}
template tuple<int, float, double> f4();
template<typename R, typename ...ArgTypes> identity<R(ArgTypes...)> f5() {}
template identity<int(int, float, double)> f5();
template<int ...Values> int_tuple<Values...> f6() {}
template int_tuple<1, 2, 3> f6();
template<template<typename> class ...Templates>
template_tuple<Templates...> f7() {}
template template_tuple<identity, add_reference> f7();
template<typename T, typename ...U> void f8(ArrayOfN<int, U..., T, typename U::type...>&) {}
template void f8<int, identity<int>, identity<float>>(int (&)[6]);
template<typename ...T> void f10(ArrayOfN<T...> &) {}
template void f10<int, float>(int (&)[2]);