Template argument deduction is done by comparing the return type of
the
conversion function template
(call it
P)
with the type that is
required as the result of the conversion (call it
A; see [dcl.init], [over.match.conv], and [over.match.ref]
for the determination of that type)
as described in [temp.deduct.type].
If P is a reference type, the type referred to by P is used in place
of P for type deduction and for any further references to or transformations of
P in the remainder of this section.
If
P
is an array type, the pointer type produced by the
array-to-pointer standard conversion ([conv.array]) is used in place of
P
for type
deduction; otherwise,
If
P
is a function type, the pointer type produced by the
function-to-pointer standard conversion ([conv.func]) is used in place of
P
for
type deduction; otherwise,
If the original A is a pointer to member function type,
A can be “pointer to member of type function”
even if the deduced A is “pointer to member of type noexcept function”.
When the deduction process requires a qualification conversion for a
pointer or pointer to member type as described above, the following
process is used to determine the deduced template argument values:
If
A
is a type
“pointer to …” “pointer to”
T1
and
P
is a type
“pointer to …” “pointer to”
T2,
then the cv-unqualified
T1
and
T2
are used as the types of
A
and
P
respectively for type deduction.