What if always use class for typename?

Anything wrong with this template class?

template <typename T>
class C
 typedef class T::SubType Subtype2;

It compiles fine on VS2011 without extenstion. This makes me wonder if keyword ‘typename’ can be removed from MSVB leaving only ‘class’ there.
Please let me know when typename HAS to be used.

Comments are closed.
%d bloggers like this: