C++ Logo

std-proposals

Advanced search

Re: [std-proposals] for loop enhancement

From: Avi Kivity <avi_at_[hidden]>
Date: Sun, 16 Mar 2025 21:12:36 +0200
On Fri, 2025-03-14 at 11:00 -0700, Thiago Macieira via Std-Proposals
wrote:
> On Friday, 14 March 2025 10:17:58 Pacific Daylight Time Andre Kostur
> via Std-
> Proposals wrote:
> > Also two other clarifications would also need to happen: what about
> > duplicate values, and in what order will that loop across the enum
> > values (recall: one can define an enum in an arbitrary order).
>
> This feature seems like it should be in the domain of reflection.
>

Good call. Could easily have a library function that generates an enum
range out of an enum definition.



Received on 2025-03-16 19:12:41