Implicit Type Conversions Involved in Template Argument DeductionFor sake of comprehensiveness, let us point out that the lvalue-to-rvalue conversion that was involved in the automatic argument deduction in our example is not the only implicit type conversion that is applied before a template argument is deduced.Before the template argument type is determined, the compiler performs the following implicit type conversions:
* lvalue transformation
* qualification conversion
* derived class to base class conversion
See the C++ Primer (  , page 500) for comprehensive coverage of this topic.Simply put, the compiler drops some type properties, like the lvalue property of the reference type in our example. For example, the compiler instantiates a function template for a value type rather than the corresponding reference type. Similarly it instantiates function templates for a pointer type rather than the corresponding array type. It drops constqualifications and would never instantiate a function template for a const type, but always for the corresponding non-const type.