Under the conditions specified in [dcl.init.ref], a reference can be bound directly
to the result of applying a conversion
function to an initializer expression.
Overload resolution is used to select the
conversion function to be invoked.
Assuming that “reference to cv1T” is the
type of the reference being initialized, and
“cvS” is the type
of the initializer expression, with
S
a class type,
the candidate functions are selected as follows:
The conversion functions of
S
and its base classes are considered. Those non-explicit conversion functions that are not hidden within
S
and yield type “lvalue reference to cv2T2”
(when initializing an lvalue reference or an rvalue reference to function) or
“cv2T2”
or “rvalue reference to cv2T2” (when initializing an
rvalue reference or an lvalue reference to function),
where “cv1T” is reference-compatible
with “cv2T2”,
are candidate functions. For direct-initialization, those explicit
conversion functions that are not hidden within S and yield
type “lvalue reference to cv2T2”
(when initializing an lvalue reference or an rvalue reference to function)
or “rvalue reference to cv2T2”
(when initializing an rvalue reference or an lvalue reference to function),
where T2 is the same type as T or can be
converted to type T with a qualification
conversion, are also candidate functions.