When a call of a function or function template
is written (explicitly, or implicitly using the
operator notation), template argument deduction ([temp.deduct]
and checking of any explicit template arguments ([temp.arg]
) are performed
for each function template to find the template argument values (if any) that
can be used with that function template to instantiate a function template
specialization that can be invoked with the call arguments or,
for conversion function templates, that can convert to the required type.
For each function template, if the argument deduction and checking succeeds,
(deduced and/or explicit)
are used to synthesize the declaration of
a single function template specialization which is
added to the candidate functions set to be used in overload resolution.
If, for a given function template, argument deduction fails or
the synthesized function template specialization would be ill-formed,
no such function is added to the set of candidate functions for that template.
The complete set of candidate functions includes all the synthesized
declarations and all of the non-template functions found by name lookup.
The synthesized declarations are
treated like any other functions in
the remainder of overload resolution, except as explicitly noted