Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/nontype-class71.C

raw
1 // PR c++/113800
2 // { dg-do compile { target c++20 } }
3 // From LLVM's temp_arg_nontype_cxx2c.cpp.
4
5 template<class T, int I>
6 struct A {
7 T x[I];
8 };
9
10 template<class T, class... U>
11 A(T, U...) -> A<T, 1 + sizeof...(U)>;
12
13 template<A a> void foo() { }
14
15 void
16 bar ()
17 {
18 foo<{1}>();
19 }