Under the conditions specified in [dcl.init], as
part of an initialization of an object of non-class type,
a conversion function can be invoked to convert an initializer
expression of class type to the type of the object
being initialized.
Overload resolution is used to select the
conversion function to be invoked.
Assuming that “cv1T” is the
type of the object 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
T
or a type that can be converted to type
T
via a standard conversion sequence ([over.ics.scs])
are candidate functions.
For direct-initialization, those explicit conversion functions that are not
hidden within S and yield type T or a type that can be converted
to type T with a qualification conversion ([conv.qual]) are also
candidate functions.
Conversion functions that return a cv-qualified type
are considered to yield the cv-unqualified version of that type
for this process of selecting candidate functions.
Conversion functions that return “reference to
cv2X”
return
lvalues or xvalues, depending on the type of reference, of type
“cv2X”
and are therefore considered to yield
X
for this
process of selecting candidate functions.