I think question is incomplete or incorrect as options 2,3 & 4 are not correct here. Only 1 is correct as both class templates and function templates are instantiated in the same way.
//Defines a template for a class that can hold two objects.
template<typename T1, typename T2>
struct pair {
T1 first;
T2 second; };
//Defines a template for a function that gives the minimum of two values.
template<typename T>
T min(T a, T b) {
return a < b ? a : b; }
Class templates can be used to write programs that execute at compile time and here we can see template instantiations with pattern matching as pure functions.