Under the conditions specified in [dcl.init], as
part of a copy-initialization of an object of class type, a user-defined
conversion can be invoked to convert an initializer expression to the
type of the object being initialized.
Overload resolution is used
to select the user-defined conversion to be invoked.
The conversion performed for indirect binding to a reference to a possibly
cv-qualified class type is determined in terms of a corresponding non-reference
copy-initialization.
— end note
]
Assuming that
“cv1T” is the type of the object being initialized, with
T
a class type,
the candidate functions are selected as follows:
When the type of the initializer expression is a class type
“cvS”,
the non-explicit conversion functions of
S
and its base classes are considered.
When initializing a temporary object ([class.mem])
to be bound to the first parameter of a constructor
where the parameter is of type
“reference to cv2T”
and the constructor is
called with a single argument in the context of
direct-initialization of an object of type “cv3T”, explicit
conversion functions are also considered.
Those that are not hidden within
S
and yield a type whose cv-unqualified version is the same type as
T
or is a derived class thereof
are candidate functions.
A call to a conversion function returning “reference to X”
is a glvalue of type X, and such a conversion function is
therefore considered to yield X for this process of selecting
candidate functions.