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

struct A;

struct C {
  operator A();
};

struct A {
  C c;
};

C c;
A a(c);  // invokes C’s conversion function to A

// { dg-final { scan-assembler "_ZN1Ccv1AEv" } }