Y
Hacker News
new
|
ask
|
show
|
jobs
by
basicoperation
1454 days ago
Nice post, but I believe that function g (with the infinite loop) is UB in C++, as it’s required that infinite loops that never break must have side-effects.
1 comments
josephcsible
1454 days ago
It isn't, because g's loop control is a constant expression. If it weren't, then it would be UB.
link