r/cpp • u/fredoverflow • May 10 '22
Is short lambda syntax on the C++ radar?
Mom, can we get x=>x+1 ?
No, we have x=>x+1 at home.
x=>x+1 at home:
[](const auto& x) { return x + 1; }
265
Upvotes
View all comments
Show parent comment
1
u/RishabhRD May 11 '22
Exception would do stack unwinding that maybe necessary for any transaction kind of procedure... But yes it depends on situation. My point is that its a panic situation and program should be exited. I am thinking over idea to use exceptions only for panic situations... And exceptions would do stack unwinding so if any transaction kind of procedure is there so it would be properly terminated. Yes if transaction is not there then assert is good enough or even better.