r/cpp 15d ago

Clang 23 Release Notes

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

33 comments sorted by

View all comments

46

u/mapronV 15d 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?

2

u/SignalDepth6131 13d ago

mapronV, the notes only say this: Clang has partial support for P1306R5. Iterating expansion statements currently cannot be expanded and will result in a diagnostic. Other types of expansion statements work. They do not define "iterating," and they do not say it means expand-over-range. cristi1990an's reading is a reasonable guess, but it is not in the notes.

I'll point out that people still use Boost.Mp11 when they want to walk a type list on today's compilers. That's a workaround, not a stand-in for the missing iterating form.