Template argument deduction is done by comparing the return type of
the
conversion function template
(call it
P)
with the type specified by the *conversion-type-id* of the
*conversion-function-id* being looked up
(call it A) as described in [temp.deduct.type].

If the *conversion-function-id* is constructed during
overload resolution ([over.match.funcs]),
the rules in the remainder of this subclause apply.

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 subclause.

If
A
is not a reference type:

- If P is an array type, the pointer type produced by the array-to-pointer standard conversion 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 is used in place of P for type deduction; otherwise,
- If P is a cv-qualified type, the top-level cv-qualifiers of P's type are ignored for type deduction.

In general, the deduction process attempts to find template argument
values that will make the deduced
A
identical to
A.

However, certain attributes of A may be ignored:

- If the original A is a reference type, any cv-qualifiers of A (i.e., the type referred to by the reference).
- If the original A is a function pointer or pointer-to-member-function type with a potentially-throwing exception specification ([except.spec]), the exception specification.
- Any cv-qualifiers in A that can be restored by a qualification conversion.

These attributes are ignored only if type deduction would
otherwise fail.

If ignoring them allows more than one possible deduced
A,
the type deduction fails.