C++ Logo


Advanced search

Re: [std-proposals] Array Index in Range-based For Loops

From: Lénárd Szolnoki <cpp_at_[hidden]>
Date: Wed, 01 Mar 2023 23:56:51 +0000
On 1 March 2023 22:47:16 GMT, Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> wrote:
>On Wed, Mar 1, 2023 at 8:57 AM Pavel Vazharov <freakpv_at_[hidden]> wrote:
>>> It would be nice if range-based for loops had an implicit counter
>>> variable
>> I'm not sure views::enumerate made it to C++ 23 or not - https://github.com/cplusplus/papers/issues/875.
>> The variable will be explicit in this case.
>I'm not gonna include a header file and use that horrible syntax.
>Having an implicit variable called "__i" would be much better.

What would it be called in an inner loop? __j?

>Std-Proposals mailing list

Received on 2023-03-01 23:56:56