cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
636 stars 18 forks source link

P2012 Fix the range-based for loop #939

Closed wg21bot closed 1 year ago

wg21bot commented 3 years ago

P2012R0 Fix the range-based for loop, Rev0 (Nicolai Josuttis, Victor Zverovich, Arthur O'Dwyer, Filipe Mulonde)

jfbastien commented 3 years ago

EWG saw this paper in today's telecon. Minutes

There is a problem to be solved with range-based for loops and lifetime of temporaries. SF F N A SA
17 10 2 0 0
A solution which might break existing code (such as the lock example Nico showed) is acceptable. SF F N A SA
3 15 7 4 0
A solution which proposes a new kind of loop is worth exploring. SF F N A SA
0 6 10 8 3
Adopt the wording proposed by Jens into P2012, and poll it at the next EWG quarterly polling period. SF F N A SA
5 9 5 7 0

For future polls: assuming we go with Jens’ proposed wording, this is a defect going back to C++11, and want CWG to treat this as a defect report on prior Standards.

wg21bot commented 3 years ago

P2012R1 Fix the range-based for loop, Rev1 (Nicolai Josuttis, Victor Zverovich, Arthur O'Dwyer, Filipe Mulonde)

jfbastien commented 3 years ago

Seen at today's EWG telecon:

POLL: send P2012r2 to EWG electronic polling for inclusion in C++23, not as a DR.

SF F N A SA
7 7 4 6 1

Result: no consensus.

wg21bot commented 2 years ago

P2012R2 Fix the range-based for loop, Rev2 (Nicolai Josuttis, Victor Zverovich, Arthur O'Dwyer, Filipe Mulonde)

jfbastien commented 1 year ago

Subsumed by https://github.com/cplusplus/papers/issues/1316