C++26: Trivial infinite loops are no longer undefined behaviour

20 points by raymii


fanf

I was hoping for a discussion in P2809 of why C++ can’t “just” adopt C’s version of the rule, but I didn’t find one.

The forward progress guarantee seems weird to me. I understand its value as a property of the infrastructure on which the program is running (the locking primitives, the scheduler, etc.) but I don’t understand why it’s necessary to extend the requirement to programs that don’t necessarily need or want that guarantee.