// PR c++/47346 // { dg-do compile } class C { struct Private { }; }; template struct exploit1 { typedef C::Private type; // { dg-error "private" } }; exploit1::type x1; template struct exploit2 : C::Private // { dg-error "private" } { }; exploit2 x2; template struct exploit3 { template // { dg-error "private" } struct E {}; }; exploit3::E<> e;