aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/paren-init7.C
blob: 81f909e943b3380da8d2cc594fc67d72a741510d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
// { dg-do run { target c++20 } }

int h;
struct i {
  i() {}
  explicit i(i &) {}
  template <typename j> i(j &) { h++; }
};

int main() {
  {
    i a[6];
    auto [b, c, d, e, f, g] = a;
  }
  i a[6];
  auto [b, c, d, e, f, g](a);
  if (h != 6)
    __builtin_abort();
}