http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58590
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> --- Or we don't reject: struct S { int member; struct member{}; }; template<class T> struct C { typedef typename T::member U; }; template class C<S>; but you see my point. I'm surprised that we don't already have something in bugzilla about this, though.