Template Argument Deduction

Template arguments are deduced when a call is made to a template function, but some or all template arguments are omitted. The compiler will attempt to deduce the intended template arguments. In most cases, this works as expected. If it does not, a compilation error occurs, in which case you should specify the template arguments explicitly.

The Visual C++ implementation of template argument deduction conforms to the C++ Standard. For the exact rules on template argument deduction, refer to the ISO Standard.

See Also


Templates and Name Resolution