Debian Codegraph @

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

raw
1 // Core Issue #1331 (const mismatch with defaulted copy constructor)
2 // { dg-do compile { target c++11 } }
3
4 struct M
5 {
6 M(M&) = default;
7 };
8
9 struct W : public M
10 {
11 W(const W&) = default; // { dg-error "implicitly deleted" "" { target c++17_down } }
12 // { dg-warning "implicitly deleted" "" { target c++20 } .-1 }
13 };