https://d.puremagic.com/issues/show_bug.cgi?id=11988
yebblies <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from yebblies <[email protected]> 2014-01-25 13:12:50 EST --- (In reply to comment #2) > (In reply to comment #1) > > Why don't we just allow `auto var = <expression>`, like in an if-statement? > > Because they would have different semantics. The if statement's body is not > entered when the expression implicitly converts to false, e.g.: > > [snip] > > So you'd end up with different semantics. Who would expect 'if' and 'switch' to have the same semantics? I don't think this is worth adding a magic symbol (nested switch statements?) but switch(auto a = b) solves this quite nicely. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
