25 ms·
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.
by basicoperation 4y 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.
- josephcsible 4y agoIt isn't, because g's loop control is a constant expression. If it weren't, then it would be UB.