Files
clang-p2996/clang/test/PCH/pack_indexing.cpp
cor3ntin ad1a65fcac [Clang][C++26] Implement Pack Indexing (P2662R3). (#72644)
Implements https://isocpp.org/files/papers/P2662R3.pdf

The feature is exposed as an extension in older language modes.
Mangling is not yet supported and that is something we will have to do before release.
2024-01-27 10:23:38 +01:00

17 lines
505 B
C++

// RUN: %clang_cc1 -std=c++2c -x c++-header %s -emit-pch -o %t.pch
// RUN: %clang_cc1 -std=c++2c -x c++ /dev/null -include-pch %t.pch
// RUN: %clang_cc1 -std=c++2c -x c++-header %s -emit-pch -fpch-instantiate-templates -o %t.pch
// RUN: %clang_cc1 -std=c++2c -x c++ /dev/null -include-pch %t.pch
template <int I, typename... U>
using Type = U...[I];
template <int I, auto...V>
constexpr auto Var = V...[I];
void fn1() {
using A = Type<1, int, long, double>;
constexpr auto V = Var<2, 0, 1, 42>;
}