This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
There is implementation divergence handling the following example:
struct A { A(const A&) = delete; }; struct B { operator A&&(); }; const A& r = B();
Conversion to an lvalue pursuant to 9.4.4 [dcl.init.ref] bullet 5.1 fails due to the attempt to invoke a deleted function, but conversion to an rvalue according to 9.4.4 [dcl.init.ref] bullet 5.3 would succeed, except that 12.2.2.7 [over.match.ref] bullet 1.1 hinges on the target type of the initialization, not the target type of the conversion.
Proposed resolution (approved by CWG 2024-08-16):
Change in 12.2.2.7 [over.match.ref] bullet 1.1 as follows:
Let R be a set of types includingfor any T2.
- “lvalue reference to cv2 T2” (when
initializingconverting to an lvaluereference or an rvalue reference to function) and- “cv2 T2” and “rvalue reference to cv2 T2” (when
initializingconverting to an rvaluereferenceor an lvaluereference toof function type)