So, according to the C++ grammar, it sure seems like for(some_struct X = {a, b, c}; ...) should work. MSVC is just plain broken I guess?
@gunvulture @GrumpyHook Declaring a variable in a for loop is really important for macros; it's not like some super esoteric thing...
-
-
@cmuratori @gunvulture@GrumpyHook Does using a constructor work, i.e. for ( some_struct X (a,b,c); ...) -
@tom_forsyth @gunvulture@GrumpyHook That is how I'm working around it currently (very painful, since it means you can't bracket _anywhere_)
End of conversation
New conversation -
-
-
@cmuratori@GrumpyHook a var sure, init struct members maybe not. the great thing about C is you can go 10+ years never seeing a usage case. -
@gunvulture
@GrumpyHook I still call poopsauce on this whole situation. - Show replies
New conversation -
-
-
@cmuratori @gunvulture@GrumpyHook why not do the do...while thing to get a new scope, and declare the loop variable there, outside the for? -
@tom_seddon @gunvulture@GrumpyHook 'cause it doesn't work in a macro. Ie., you want to be able to make ForEach(some_container) {...}
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.