Got tired of writing for loops. Wrote a macro, loop(x), that expands to a for loop. Wondering why it's not a lang feature for C++ yet, tbh.
-
-
Vastauksena käyttäjälle @tloch14
It's weird, because I have that dirty macro feeling when I use it, but it just feels so good to write loop(x) I don't even care.
1 vastaus 0 uudelleentwiittausta 2 tykkäystä -
Vastauksena käyttäjälle @tloch14
Notworthy that it doesn't work for nested loops where you want to access the outer variable, but still good.
1 vastaus 0 uudelleentwiittausta 1 tykkäys
By some __VA_ARGS__ macro magic, loop(x) now uses i as the variable name and loop(var,x) uses 'var' as the variable name.
21.47 - 5. jouluk. 2016
0 vastausta
0 uudelleentwiittausta
1 tykkäys
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.