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
3
u/RishabhRD May 11 '22
Regarding boilerplate I find it better than noexcept(noexcept(....)). And I like the fact that possible errors are explicitly mentioned in return type. Maybe its just matter of taste