2.1 KiB
[over.match.ref]
12 Overloading [over]
12.2 Overload resolution [over.match]
12.2.2 Candidate functions and argument lists [over.match.funcs]
12.2.2.7 Initialization by conversion function for direct reference binding [over.match.ref]
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 cv1 Tâ is the type of the reference being initialized, the candidate functions are selected as follows:
Let R be a set of types including
âlvalue reference to cv2 T2â (when converting to an lvalue) and
âcv2 T2â and ârvalue reference to cv2 T2â (when converting to an rvalue or an lvalue of function type)
for any T2. The permissible types for non-explicit conversion functions are the members of R where âcv1 Tâ is reference-compatible ([dcl.init.ref]) with âcv2 T2â. For direct-initialization, the permissible types for explicit conversion functions are the members of R where T2 can be converted to type T with a (possibly trivial) qualification conversion ([conv.qual]); otherwise there are none.
The argument list has one argument, which is the initializer expression.
[Note 1:
This argument will be compared against the object parameter of the conversion functions.
â end note]