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