
David A. answered 10/10/19
Experienced C++ tutor who loves to mentor and pass on my knowledge
There is no difference between using <typename T> vs. <class T>; i.e. it is a convention used by C++ programmers. I myself prefer <typename T> as it more clearly describes it use; i.e. defining a template with a specific type :)
Note: There is one exception where you do have to use class (and not typename) when declaring a template template parameter:
template <template <typename> class T> class C { }; // valid!
template <template <typename> typename T> class C { }; // invalid!
In most cases, you will not be defining a nested template definition, so either definition will work -- just be consistent in your use...
I hope this helps.