Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
basicoperation
· 4y ago · 0 comments
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.
Comments
[–]
josephcsible
4y ago
It isn't, because g's loop control is a constant expression. If it weren't, then it would be UB.