On 10/21/2016 12:39 PM, Vladimir Panteleev wrote:
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu wrote:
What would be a good solution to forbid certain constructs in the
increment part of a for statement?

For this specific case, a clear solution would be to forbid evaluating
lambdas as a boolean expression, because they will always be true, and
thus almost always an error.

Read the example again, the lambda is not evaluated as a bool. -- Andrei


Reply via email to