October 1997
Intermediate to advanced
800 pages
20h 48m
English
Template functions affect overloading resolution (page 270). The compiler uses the following algorithm to resolve overloaded function calls.
Look at all nontemplate functions first, and determine if there is a function whose signature exactly matches the function call's argument types.
Look for a template function whose signature exactly matches the function call's argument types.
Resolve the function call with nontemplate functions, using conversion rules (trivial conversions, promotions, standard conversions, and user-defined conversions).
Template function signatures must match function call arguments exactly in the second step. The compiler attempts conversions for arguments only in the third step. Compilation ...