On Tuesday, 18 April 2017 at 00:48:05 UTC, Jethro wrote:
How to combine the need to localize a result for an if statement and have to call a method to get proper comparison:[...] which should simplify toif ((auto x = foo()).valid()) { } but this code does not work. [...]
for(auto x = foo(); foo.valid();) { ... your code here ... break; } it would be useful if this syntax was supported: for(auto x = foo(); foo.valid(); break) { } Andrea