C++ Logo

std-proposals

Advanced search

Re: [std-proposals] !continue

From: Julien Jorge <julien.jorge_at_[hidden]>
Date: Sun, 5 Nov 2023 22:27:21 +0100
Le 05/11/2023 à 21:38, Frederick Virchanza Gotham via Std-Proposals a
écrit :
> This code I've written today will work fine on a microcontroller, but
> on a desktop PC that has extreme debugging enabled (for example
> 'mudflap' or 'address santiser'), the debugger will stop the program
> when it sees that 'p' has become less than 'buf'.
As far as I can tell AddressSanitizer does not care that 'p' becomes
less than 'buf', as long as it is not dereferenced. So there would be no
problem here.
> So I was thinking . . . what if we could easily express that we want
> to continue on to the next iteration of the loop, but that we don't
> want to execute the post-iterative step.

If you don't want the post-iterative step to be executed at each
iteration, then maybe don't write a post-iterative step? You can leave
it empty and put the increment where it matters in the body of the loop.

Julien

Received on 2023-11-05 21:27:26