gcc/testsuite/g++.dg/cpp2a/paren-init23.C
raw| 1 | // PR c++/93790 - wrong paren-init of aggregates interference. |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct S { |
| 5 | int i; |
| 6 | }; |
| 7 | const S& s(1); |
| 8 | |
| 9 | struct A { |
| 10 | int i; |
| 11 | A(int); |
| 12 | }; |
| 13 | const A& a(1); |
| 14 | |
| 15 | struct B { |
| 16 | int i; |
| 17 | B(int) = delete; |
| 18 | }; |
| 19 | const B& b(1); // { dg-error "use of deleted function" } |