Closed wg21bot closed 1 year ago
Paper is https://github.com/cplusplus/papers/issues/1316 Duplicated by https://github.com/cplusplus/nbballot/issues/407
Forward P2644R0 to CWG for inclusion in C++23.
SF | F | N | A | SA |
---|---|---|---|---|
25 | 16 | 2 | 2 | 2 |
Result: Consensus.
Note that I asked whether the paper had CWG review and implementation experience, and the answer was "no".
CWG 2022-11-11: Reviewed D2718R0 for the wording.
Accepted with Modifications. See P2718R0 for details.
Fix cwg900: Range-based for loop is broken with references to temporaries
For more than 14 years cwg900 is open now and it affects one of the key control structures of C++.
While we had an accepted proposed direction to fix it with P2012, the proposed wording was not accepted, because some people wanted to have a broader fix. But nothing happened. It is really important to accept now the proposed fix of P2012 because use of containers, tuples, optionals, variants, spans, getters that return references, and even coroutines that yield references in range-based for loops is affected. Therefore accept the proposed wording of P2012 to fix this still open bug.
Note that P2644R0 provides up-to-date proposed wording.
Apply P2644.