Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/defaulted63.C

raw
1 // PR c++/116162
2 // { dg-do compile { target c++11 } }
3
4 struct C0 {
5 C0(C0&) = default;
6 };
7
8 struct C1 {
9 C1(volatile C1&) = default; // { dg-warning "implicitly deleted" "" { target c++20 } }
10 // { dg-error "does not match" "" { target c++17_down } .-1 }
11 };
12
13 struct C2 {
14 C2(const C2&) = default;
15 };
16
17 struct C3 {
18 C3(const volatile C3&) = default; // { dg-warning "implicitly deleted" "" { target c++20 } }
19 // { dg-error "does not match" "" { target c++17_down } .-1 }
20 };
21
22 struct M0 {
23 M0(M0&&) = default;
24 };
25
26 struct M1 {
27 M1(const M1&&) = default; // { dg-warning "implicitly deleted" "" { target c++20 } }
28 // { dg-error "does not match" "" { target c++17_down } .-1 }
29 };
30
31 struct M2 {
32 M2(volatile M2&&) = default; // { dg-warning "implicitly deleted" "" { target c++20 } }
33 // { dg-error "does not match" "" { target c++17_down } .-1 }
34 };
35
36 struct M3 {
37 M3(const volatile M3&&) = default; // { dg-warning "implicitly deleted" "" { target c++20 } }
38 // { dg-error "does not match" "" { target c++17_down } .-1 }
39 };