‹ BackHN Continuity

Thread

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

173 points · 290 comments · ibobev

  1. 0x69420 · · focus · HN ↗
    > The mentioned proposal was also accepted as a defect report, so implementations may apply the fix to earlier C++ modes as well. That is why you might not be able to reproduce the old behaviour on a recent compiler even in C++20 mode.

    brutal. hope major compiler vendors throw in a flag that can bring some sanity to this

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.