We have https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#__cpp_range_based_for already so we might as well bump it.

I'm not sure what you would actually do with the information tho - there's not really any benefit to writing the loop two ways, just write it the way that works. 

On Wed, Nov 16, 2022, 2:37 PM Thomas Köppe via Core <core@lists.isocpp.org> wrote:
Does the new range-based `for` behaviour require a feature test macro?

On Fri, 11 Nov 2022 at 11:11, Joshua Berne (BLOOMBERG/ 919 3RD A) via Core <core@lists.isocpp.org> wrote:
I have extracted the wording into a separate file and put it on the core wiki:

We had specified one small fix, which I implemented by changing "the object persists until the completion of the statement." into "the object persists for the lifetime of the reference initialized by the for-range-initializer." I also made changes to p7 to make it apply to these temporaries and not only to temporaries bound to references. I believe this is all we ended up needing to get these temporaries to live for the correct lifetime, and be destroyed at the correct time.

I think we have reviewed the second example, but not the new annex C example. I believe that will need at least a little time in core to decide if it is good or if it should be trimmed down significantly. I did make minor changes to it (because word was very helpful and capitlized the v in void for you).

I'm happy to update this file further during/after core review, or Nico is welcome to incorporate these changes back into his paper before continuing his core review at some point in the future. I know Nico might not be available tomorrow, so if we have time and inclination to have this make progress tomorrow we will need to update this file separately. After that we can pick the final ship vehicle. (Make my file a new paper, have Nico incorporate the final version with all fixes, etc.)




From: core@lists.isocpp.org At: 11/11/22 01:54:45 UTC-5:00
To: core@lists.isocpp.org, Jens.Maurer@gmx.net
Cc: nico@josuttis.de
Subject: [isocpp-core] draft new wording for fixing the range-based for loop (D2644R1)

Hi,

the draft new wording is attached to the CWG wiki page
(both pdf and word file because this is my last day being 59 and I will
probably have no time dealing with it this week):


 https://wiki.edg.com/pub/Wg21kona2022/CoreWorkingGroup/D2644R1_fix_rangebasedfo
r_221110.docx


 https://wiki.edg.com/pub/Wg21kona2022/CoreWorkingGroup/D2644R1_fix_rangebasedfo
r_221110.pdf

I hope you can handle it without me.

If you tell me what to do, I will be able to do it in the night before
Saturday your time, I guess, though.

Thanks

  Nico

--
---
Nicolai M. Josuttis
www.josuttis.de
+49 (0)531 / 129 88 86
+49 (0)700 / JOSUTTIS

Books:
C++: http://cppstd20.com, http://cppstd17.com, http://cppmove.com,
http://cppstdlib.com, http://tmplbook.com

_______________________________________________
Core mailing list
Core@lists.isocpp.org
Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
Link to this post: http://lists.isocpp.org/core/2022/11/13527.php

_______________________________________________
Core mailing list
Core@lists.isocpp.org
Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
Link to this post: http://lists.isocpp.org/core/2022/11/13528.php
_______________________________________________
Core mailing list
Core@lists.isocpp.org
Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
Link to this post: http://lists.isocpp.org/core/2022/11/13572.php