Debian Codegraph @

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

raw
1 // PR c++/116162
2 // { dg-do compile { target c++11 } }
3
4 struct M
5 {
6 M& operator=(M&&);
7 };
8
9 struct R
10 {
11 R& operator=(R&&) = default;
12 M m;
13 };
14
15 struct S
16 {
17 S& operator=(const S&&) = default; // { dg-warning "implicitly deleted" "" { target c++20 } }
18 // { dg-error "does not match" "" { target c++17_down } .-1 }
19
20 M m;
21 };
22
23 struct T
24 {
25 T operator=(T&&) = default; // { dg-error "defaulted" }
26 M m;
27 };