C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Bringing break/continue with label to C++

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 20 Dec 2024 14:36:07 +0200
On Fri, 20 Dec 2024 at 14:33, Filip via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Do maybe the syntax should be different?
>
> In order to avoid confusion around goto labels we could add names in different name, at the end?
> 1. for (…) outerLoop { . . . }
> 2. outerLoop for (…) { . . . }
>
> Then they are different then goto labels in syntax since we drop the ‘:’ and goto would not work with those labels.

What exactly is wrong with
for outerloop (...) { ... }
?

Received on 2024-12-20 12:36:22