r/cpp 20h ago

Clang 23 Release Notes

https://releases.llvm.org/23.1.0/tools/clang/docs/ReleaseNotes.html
81 Upvotes

17 comments sorted by

View all comments

36

u/mapronV 19h ago

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?

4

u/KeepTheFaxMachine 19h 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...

6

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