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?
12
Upvotes
View all comments
Show parent comment
2
u/erichkeane Clang Maintainer(Templates), EWG Chair May 09 '26
You understate the weirdy issues with temporaries :) They are a GCC extension that we have in Clang, but their effect on lifetime is absolutely absurd, to the point that they become very difficult to use in C++ correctly very quickly.