// PR c++/104641 // { dg-do compile { target c++11 } } template struct A { template struct B { B(U); }; private: template struct C { C(U); }; }; template void f() { typename A::B x = 0; auto y = typename A::B(0); auto z = typename A::B{0}; typename A::C w(0); // { dg-error "private" "" { target c++17 } } } template void f(); // { dg-error "not a type" "" { target c++14_down } 13 } // { dg-error "not a type" "" { target c++14_down } 14 } // { dg-error "not a type" "" { target c++14_down } 15 } // { dg-error "not a type" "" { target c++14_down } 16 }