Under the conditions specified in [dcl.init.ref], a reference can be bound directly
to a glvalue or class prvalue that is 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
a class type,
the candidate functions are selected as follows:
The conversion functions of
and its base classes are considered.
Those non-explicit conversion functions that are not hidden within
and yield type “lvalue reference to cv2T2”
(when initializing an lvalue reference or an rvalue reference to function) or
or “rvalue reference to cv2T2” (when initializing an
rvalue reference or an lvalue reference to function),
where “cv1T” is reference-compatible
are candidate functions.
For direct-initialization, those explicit
conversion functions that are not hidden within S and yield
type “lvalue reference to cv2T2” or “cv2T2” or “rvalue reference to cv2T2”,
respectively, where T2 is the same type as T or can be
converted to type T with a qualification
conversion, are also candidate functions.