Created on 2024-07-18.00:00:00 last changed yesterday
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)
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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-11-19 12:01:24 | admin | set | status: tentatively ready -> ready |
2024-08-16 19:45:15 | admin | set | status: open -> tentatively ready |
2024-08-02 11:50:11 | admin | set | messages: + msg7784 |
2024-07-18 00:00:00 | admin | create |