aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/new-array3.C
blob: f35124e159dd8ac7561849dc7a5546b93752deac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/93529
// P1009: Array size deduction in new-expressions
// { dg-do compile { target c++11 } }

template<typename... T>
int *fn(T... t)
{
  return new int[]{t...};
}

int
main ()
{
  int *p0 = fn ();
  int *p1 = fn (1);
  int *p3 = fn (1, 2, 3);
}