Consider: struct X { typedef int type; }; template<typename T> void f() { sizeof(T::type); } template void f<X>(); Clang diagnoses this as: <stdin>:2:43: error: unexpected type name 'type': expected expression template<typename T> void f() { sizeof(T::type); } ^ <stdin>:3:15: note: in instantiation of function template specialization 'f<X>' requested here template void f<X>(); ^ ... but this sort of thing apparently happens inside MS system headers. We should support this case of missing 'typename' more elegantly -- perhaps we can teach TreeTransform to cope with this during instantiation.
If we implemented token substitution for template instantiation, would this be fixed?
(In reply to comment #1) > If we implemented token substitution for template instantiation, would this > be fixed? Yes, that'd do the trick.