C++ Logo

std-proposals

Advanced search

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

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Wed, 1 Mar 2023 22:47:16 +0000
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.

Received on 2023-03-01 22:47:29