C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Discussion: A proposed repeat statement for C++

From: Andre Kostur <andre_at_[hidden]>
Date: Mon, 16 Nov 2026 10:07:06 -0700
On Mon, Nov 16, 2026 at 9:58 AM scbd Gm via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> I believe this feature could provide cleaner and more explicit control flow in C++.

OK, demonstrate that. Beyond that it is merely possible: but some
examples how this would materially improve the state of the language.

> A dedicated repeat statement would make this operation explicit, improve readability, and allow programmers to express the intention of restarting the current iteration without manually managing labels and jump targets.

This doesn't fit for me. I expect a for loop to step through its
sequence. I do not expect a for loop to repeat its body without
executing that third clause.

Received on 2026-11-16 17:07:19