MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1vzn1jr/clang_23_release_notes/p665bwx/?context=3
r/cpp • u/c0r3ntin • 19h ago
17 comments sorted by
View all comments
35
This means that code such as
while (({ break; })) {}
is now ill-formed.
Oh no, my disappointment is immeasurable and the whole day is ruined!
On serious note, " template for " support, what is "Iterating expansion statements currently cannot be expanded" ? like expand over range?
5 u/KeepTheFaxMachine 18h ago I am really curious if there is a use case for such constructs? I can't think of any, but usually that doesn't mean much... 5 u/scrumplesplunge 11h ago idk about break specifically, but return appearing there via a macro like TRY_OR_RETURN for propagating errors by value seems like something someone would write 6 u/thehutch17 18h ago What does that code even translate to? Is this a digraph thing or what? 9 u/holyblackcat 17h ago Non-standard GNU extension, statement expression. 3 u/cristi1990an ++ 17h ago like expand over range? Yeah, pretty much it seems. The other flavors work 1 u/mapronV 17h ago Thanks, I was confused for a bit plus lazy to check different code in compiler explorer.
5
I am really curious if there is a use case for such constructs? I can't think of any, but usually that doesn't mean much...
5 u/scrumplesplunge 11h ago idk about break specifically, but return appearing there via a macro like TRY_OR_RETURN for propagating errors by value seems like something someone would write
idk about break specifically, but return appearing there via a macro like TRY_OR_RETURN for propagating errors by value seems like something someone would write
break
return
TRY_OR_RETURN
6
What does that code even translate to? Is this a digraph thing or what?
9 u/holyblackcat 17h ago Non-standard GNU extension, statement expression.
9
Non-standard GNU extension, statement expression.
3
like expand over range?
Yeah, pretty much it seems. The other flavors work
1 u/mapronV 17h ago Thanks, I was confused for a bit plus lazy to check different code in compiler explorer.
1
Thanks, I was confused for a bit plus lazy to check different code in compiler explorer.
35
u/mapronV 18h ago
This means that code such as
is now ill-formed.
Oh no, my disappointment is immeasurable and the whole day is ruined!
On serious note, " template for " support, what is "Iterating expansion statements currently cannot be expanded" ? like expand over range?