Revenge of a Buzz Saw

I had no idea this was legal C++. I approve!

while (Stuff* stuff = getNextStuff()) delete stuff;

I guess it makes sense given the for-loop’s ability to declare local variables. I just never tried this before.

Blog comments powered by Disqus