Writing Template A function template is a pattern constructed based on given actual types type parameter said to be"bound"to the actual type passed to it Calling a function with template type inside the function template<typename T> void fo i T f(); COMP 152Writing Template ▪ A function template is a pattern • constructed based on given actual types • type parameter said to be "bound" to the actual type passed to it ▪ Calling a function with template type inside the function COMP152 10 template<typename T> void f() { T a; … } f();