DMD 0.148 - regular expressions

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Mon Mar 6 11:46:44 PST 2006


Walter Bright wrote:
> "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:

OK, I get it.

> 
>     if (auto a = foo() || auto b = bar())
>     {
>             a + b;        // is b declared or not?
>     } 
> 
> 



More information about the Digitalmars-d mailing list