r/cpp • u/javascript • May 09 '26
Any good tech talks leveraging statement expressions?
Lambdas do a great job in a lot of cases but sometimes you need a statement expression. Any good content on youtube?
14
Upvotes
View all comments
Show parent comment
1
u/erichkeane Clang Maintainer(Templates), EWG Chair May 09 '26
I'd have to page in all the problems with them again, I haven't poked at them in a few years.
But my rule of thumb at one point was to never have a lifetime with side effects start in a statement expression, and definitely never do multiple returns when you do.