Template Arguments
In this lesson, we will look at template arguments.
We'll cover the following
Template arguments can automatically be deduced for function templates. The compiler deduces the template arguments for the function arguments. Function Templates act like functions.
Conversion
-
The compiler uses simple conversions for deducing the template arguments from the function arguments.
-
The compiler removes
const
orvolatile
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 1200+ tech skills courses.