Blair Davidson
Blair Davidson

Reputation: 951

C++ Template Terminology

If I have the following

template<class T> print_all(vector<T> const & collection);

What would you call T in context of the declaration? i.e. Would you say that T is the argument for vector const & collection? i.e It satisfies a vector as the type is closed?

Keen to find out what the actual terminology is.

Upvotes: 8

Views: 469

Answers (1)

T is a template parameter of the function template print_all, which is used as a template argument for the class template vector.

Upvotes: 16

Related Questions