1 // Contributed by Dodji Seketeli <dodji@redhat.com> 2 // Origin PR c++/40007 3 // { dg-do compile } 4 5 template<typename T> 6 struct x 7 { 8 protected: 9 typedef int type; 10 }; 11 12 template<typename T> 13 struct y : public x<T> 14 { 15 typename x<T>::type z; 16 }; 17 18 template<> 19 struct y<void> : public x<void> 20 { 21 typedef x<void>::type z; 22 }; 23 24 template class y<int>; 25