http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52618
--- Comment #2 from blobbyvolley at mailmetrash dot com 2012-03-20 11:53:29 UTC --- If it can be of any help, I noticed that for partial specializations everything works as intended (the compiler reports an error). class B { typedef double type; // this is a private member }; template<class T, class U> struct get_type; template<class U> struct get_type<B, U> { // partial specialization typedef typename B::type type; // error here }; typedef typename get_type<B, int>::type sometype;