1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// PR c++/48537 // { dg-options -std=c++0x } struct SFoo { SFoo() =delete; // { dg-error "declared" } }; union UFoo // { dg-error "deleted" } { SFoo foo; }; int main() { UFoo(); // { dg-error "deleted" } }