summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/paren-init19.C
blob: 065e16a21bef6ac7d60386e11a4f960360398735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
// { dg-do compile { target c++20 } }

struct A {
  int i[2];
};

A a({1});
A a2({1, 2});
A a3(1); // { dg-error "array must be initialized with a brace-enclosed initializer" }
A a4 = A(1); // { dg-error "array must be initialized with a brace-enclosed initializer" }
A a5 = A({1});