Bug or logic error in if with auto?

Peter Alexander peter.alexander.au at gmail.com
Sun Dec 2 07:59:42 PST 2012


And no, it cannot be made to work, because the grammar would be 
ambiguous:

if (auto x = y && z)

Does this mean?

if (auto x = (y && z))

or

if (auto x = y)
     if (x && z)


You could make it work with new syntax, but given you can just 
use two if-statements, I don't see any point.


More information about the Digitalmars-d mailing list