Date: Wed, 24 May 2023 15:18:17 +0200
On 24/05/2023 15:02, language.lawyer--- via Std-Proposals wrote:
> if (Failed(Condition0)) goto skip_Code_to_execute;
> if (Failed(Condition1)) goto skip_Code_to_execute;
>
> Code_to_execute;
>
> skip_Code_to_execute:
> ...
1) If "Code_to_execute" contains declaration with non-vacuous
initialization, then this is ill formed as per:
https://eel.is/c++draft/stmt.dcl#2
2) This doesn't work in constexpr (even after P2242).
So this isn't equivalent to what has been proposed.
My 2 c,
> if (Failed(Condition0)) goto skip_Code_to_execute;
> if (Failed(Condition1)) goto skip_Code_to_execute;
>
> Code_to_execute;
>
> skip_Code_to_execute:
> ...
1) If "Code_to_execute" contains declaration with non-vacuous
initialization, then this is ill formed as per:
https://eel.is/c++draft/stmt.dcl#2
2) This doesn't work in constexpr (even after P2242).
So this isn't equivalent to what has been proposed.
My 2 c,
-- Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
Received on 2023-05-24 13:18:20