Why must the template parameter appear in the parameter list of the template function?
I found this on the templates, and it gives a pretty representation of template and parameters it could have. I hope this helps. :) https://www.cs.bu.edu/teaching/cs113/fall-2000/template/ Elle
The template parameter must appear in the parameter list of the template function. According to my view just as with a formal argument name in a function declaration, giving a name to a template parameter in a template declaration is optional. As with a function definition, the name of a template parameter is required only in a template definition and only if the parameter name is used in the template. With formal arguments in function declarations, it's common to give names to template parameters in temp.late declarations to help document the template. In simple, it will help you to load faster from the list and carry out the sequential operation. For example; why do u use sms templates in mobiles ? Because they are programmed to display the whole data when u press the template function. Its an easy way to ensure time efficient programming ( the programs which takes place in seconds according to the generated code)... Thank You n hope it helps... And when the
Join our real-time social learning platform and learn together with your friends!