C++ Language/Templates/TemplatedFunctions

A templated-function looks like any ordinary function, but with "template-parameter" placeholders for some types:. No compilation happens here where this templated-function is being defined; instead, this  will get compiled (with "specialization"   applied) during the first occurrence of that usage, as in. In this case, you could have simply written, since the compiler could infer   from those parameter types.

Additional information about templated-functions (includes interactive examples)