When declaring a template, you can use: tempate <class T> and template <typename T>, but not template <struct T>.
You can pass a struct as a template argument, but the template parameter needs to be declared with either 'class' or 'typename'. Using 'typename' is preferred, because 'class' can be confusing.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment