Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/new-array3.C

raw
1 // PR c++/93529
2 // P1009: Array size deduction in new-expressions
3 // { dg-do compile { target c++11 } }
4
5 template<typename... T>
6 int *fn(T... t)
7 {
8 return new int[]{t...};
9 }
10
11 int
12 main ()
13 {
14 int *p0 = fn ();
15 int *p1 = fn (1);
16 int *p3 = fn (1, 2, 3);
17 }