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
8
u/fdwr fdwr@github đ May 09 '26
Do expressions would fill that role nicely. I am unsure where that paper stands now, but seems to have been caught up in some pattern matching quagmire rather proceeding on its own.
5
u/Ecstatic_Lavishness1 May 09 '26
Peaked my curiosity as I had never heard of them before, but then I'm an old fart. Apparently its a GNU C/C++ thing only. Looks cool and has interesting possibilities - has some weirdy issues with temporaries. Looks to be useful - though I'm definitely enamored of lambdas. Best thing ever since sliced bread!
1
u/L_uciferMorningstar May 09 '26
Can you pinpoint a use case where constexpr, lambdas or inline functions don't cut it? The core guidelines discourage macro usage so I am doubtful many talks will exist on such niche macro usage.
18
u/[deleted] May 09 '26
[removed] â view removed comment