The main reason it doesn't work is because the sandard says that
the T here is in a non-deduced context. The reason why the
context is not deduced is because when you pass some type to the
function, the compiler would have to instantiate every single
possible std::vector (including for types not present in this
particular translation unit) in order to try to find one which
had a corresponding type.
Of course, in case of std::vector, the compiler could contain
some magic to make this work, since the semantics of the class
are defined by the standard. But generally,
TemplateClass<T>::NestedType can be a typedef to literally
anything, and there's nothing the compiler can do about it.