Date: Sat, 20 Sep 2025 12:31:38 +0100
On 20 September 2025 01:46:46 BST, Thiago Macieira via Std-Discussion <std-discussion_at_[hidden]> wrote:
>On Friday, 19 September 2025 09:08:08 Pacific Daylight Time Lénárd Szolnoki via
>Std-Discussion wrote:
>> Then compilers can insert a trap for provably infinite loops.
>
>Which is probably the exact opposite of what the developer meant with an
>intentional infinite loop.
>
Trivial infinite loops are added in C++26 as "yield forever". Non-trivial ones are not likely to be intentional, but even if they are they also don't achieve what the developer meant, as they are UB now.
>On Friday, 19 September 2025 09:08:08 Pacific Daylight Time Lénárd Szolnoki via
>Std-Discussion wrote:
>> Then compilers can insert a trap for provably infinite loops.
>
>Which is probably the exact opposite of what the developer meant with an
>intentional infinite loop.
>
Trivial infinite loops are added in C++26 as "yield forever". Non-trivial ones are not likely to be intentional, but even if they are they also don't achieve what the developer meant, as they are UB now.
Received on 2025-09-20 11:31:52