Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/aggr1.C

raw
1 // { dg-do compile { target c++11 } }
2 struct A {
3 A () = delete; // { dg-message "declared here" "" { target c++20 } }
4 };
5 struct B {
6 B () = default;
7 int b = 0;
8 };
9 struct C {
10 C (C&&) = default; // { dg-message "candidate" "" { target c++20 } }
11 int c, d;
12 };
13 A a {}; // { dg-error "use of deleted function" "" { target c++20 } }
14 B b = {1}; // { dg-error "could not convert" "" { target { c++11_only || c++20 } } }
15 C *c = new C {2, 3}; // { dg-error "no matching function for call to" "" { target c++20 } }