C++ Logo

std-proposals

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 3 Mar 2023 12:15:40 +0200
On Fri, 3 Mar 2023 at 12:11, Andrey Semashev via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On 3/3/23 12:58, Jonathan Wakely wrote:
> > Not necessarily.
>
> That doesn't sound confident. I repeat, there must be *zero* problems
> mixing modules and `#includes`, because I guarantee that's what's going
> to happen during the lengthy transition period. If that transition is
> not possible then modules are DOA.

The transition is possible just fine, and there's field experience on
it, but you can't
automatically convert a non-modular header into a module.


> > most programs use a lot more from the standard library than that. If you
> > don't want to include more than that, that's fine. But you don't get to
> > argue against new library features on the basis that you've made
> > personal choices that most people would consider a silly self-imposed
> > limitation.
>
> I'm arguing that disregarding the cost of `#including` the feature is
> irresponsible. Saying "oh, we have modules now, #includes don't matter"
> is irresponsible and not a valid argument when discussing a new library
> feature.

Perhaps, but as far as this nonsense thread goes, you can either use
std::views::enumerate,
or you can use a range-for init-statement. If there are people who
insist that they 'need' yet
another way to do it, I'll happily respond "no you don't" and stop
wasting time on this discussion.

Received on 2023-03-03 10:15:53