Explain: A template function is not a function
I picked up this from a book. It says
template function is not a function. The prototype for a template function is
maximum<T>(T, T). The function that this template creates when T is int is
the function (not template function) maximum(int, int).
How does C++ create the versions of the template maximum() ?
The main() function implicitly causes C++ to create two versions of maximum()
Can you give me an example ?
Secondly, C++ does itself create a function from a template or do we have to do it somehow ?
Creating a function from a template is called instantiating the template.