Template Arguments

In this lesson, we will look at template arguments.

Template arguments can automatically be deduced for function templates. The compiler deduces the template arguments for the function arguments. Function Templates act like functions.


  • The compiler uses simple conversions for deducing the template arguments from the function arguments.

  • The compiler removes const or volatile from the function arguments. It converts C-arrays and functions to pointers.

The types of function arguments must be exact since no conversion takes place.

Get hands-on with 1000+ tech skills courses.