logoalt Hacker News

ameliaquiningtoday at 3:55 PM1 replyview on HN

The article, most unfortunately, doesn't explain why anyone would want infinite loops to be UB in the first place. I found this explanation: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1528.htm


Replies

omoikanetoday at 3:59 PM

The article mentions it's a halt-on-error pattern:

https://www.sandordargo.com/blog/2026/09/16/cpp26-trivial-in...

Edit: sorry, missed the UB bit.

show 2 replies