A do expression allows all the normal control flow, e.g. return, break, continue (or in same cases even goto).

That is not possible with a lambda (e.g. an immediately invoked one in this case).


 

-----Ursprüngliche Nachricht-----
Von: Tymi via Std-Proposals <std-proposals@lists.isocpp.org>

 

I don't understand the difference between that and a lambda tbh

I might be misunderstanding something though, or maybe missing the point of possible optimisations here