February 2005
Beginner to intermediate
272 pages
4h 53m
English
Function templates can be overloaded with other function templates and with nontemplate functions. This capability is useful but easy to abuse.
One of the major differences between function templates and nontemplate functions is the availability of implicit conversions of actual arguments. Nontemplate functions allow a wide range of implicit conversions on their arguments, from built-in conversions (like integral promotions) to user-defined conversions (nonexplicit single argument constructors and conversion operators). In the case of function templates, because the compiler must perform argument deduction based on the types of the arguments, only trivial implicit conversions will be performed, including ...
Read now
Unlock full access