21 lines · cpp
1// RUN: %clang_cc1 -std=c++2c -x c++-header %s -emit-pch -o %t.pch2// RUN: %clang_cc1 -std=c++2c -x c++ /dev/null -include-pch %t.pch3 4// RUN: %clang_cc1 -std=c++2c -x c++-header %s -emit-pch -fpch-instantiate-templates -o %t.pch5// RUN: %clang_cc1 -std=c++2c -x c++ /dev/null -include-pch %t.pch6 7template <int I, typename... U>8using Type = U...[I];9 10template <int I, auto...V>11constexpr auto Var = V...[I];12 13template <int I, auto...V>14decltype(V...[I]) foo() { return V...[I]; }15 16void fn1() {17 using A = Type<1, int, long, double>;18 constexpr auto V = Var<2, 0, 1, 42>;19 foo<2, 0, 1, 42>();20}21