C++ Logo

std-proposals

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 6 Jan 2025 18:53:54 +0200
On Mon, 6 Jan 2025 at 18:20, Arthur O'Dwyer via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> More background on the `goto` thing: C++ has supported loops, break, continue, and (more to the point) `switch` in constexpr evaluation mode since C++14. C++ has never supported `goto` in constexpr. As Richard Hodges said, this isn't for any deep technical reason; it's because "goto is bad".

That is not correct. Implementation vendors have reported that
supporting goto in their constexpr interpreters is a significant
additional
burden, and one unlike the burden required for supporting switch-case
or break/continue.

Received on 2025-01-06 16:54:09