Does msvc have an analogue of gcc ({}).
I guess the answer is no.
Note that this is a matter of compiler capabilities, not a matter of taste or style.
Not that I recommend that anyone start using the ({}) construct on the subject.
A reference to the ({}) construct: http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC62 is officially called "Expressions and Declarations in Expressions". This allows you to embed expressions (e.g. for, goto) and declarations in expressions.
gcc visual-c ++
Andrei
source share