DMD 0.148 - regular expressions
Walter Bright
newshound at digitalmars.com
Mon Mar 6 08:43:45 PST 2006
"Ivan Senji" <ivan.senji_REMOVE_ at _THIS__gmail.com> wrote in message
news:dubrop$118j$1 at digitaldaemon.com...
> Will this work:
>
> if( auto a = something() && auto b = something())
>
> a more general solution of declaring/initializing variables by parts of
> expressions?
No, it won't work. Embedding declarations inside expressions leads to all
sorts of problems, not the least of which is what happens in this scenario:
if (auto a = foo() || auto b = bar())
{
a + b; // is b declared or not?
}
More information about the Digitalmars-d
mailing list