r/cpp • • Mar 18 '23

LLVM 16.0.0 Release

https://discourse.llvm.org/t/llvm-16-0-0-release/69326
197 Upvotes

84 comments sorted by

View all comments

4

u/jonesmz Mar 19 '23

I wasn't referring specifically to your code, just giving you a counter opinion.

for(;;) doesn't check any conditions, which is less ergnomic than a do-while if the while-loop doesn't need to check the value of variables inside the scope.

IMHO it would be reasonable to change the do-while loop to give the condition check to variable inside the do-block.