1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
// PR c++/46736 // { dg-options -std=c++0x } struct U { U(); U(U const&); }; struct X { U const u; X(); X(X&&); }; X::X(X&&)=default; // { dg-error "implicitly deleted" } // { dg-error "does not have a move constructor" "" { target *-*-* } 15 } X f() { return X(); }