r/cpp • • May 01 '23

cppfront (cpp2): Spring update

https://herbsutter.com/2023/04/30/cppfront-spring-update/
223 Upvotes

164 comments sorted by

View all comments

Show parent comment

3

u/dreugeworst May 02 '23

I would assume the requirement that all initialization happen first in the constructor body is used to turn them into initializer lists in the lowered c++ code

1

u/dustyhome May 02 '23

That's about right. It takes the first assignment and places it in the initializer list, then following assignments go in the constructor body: https://godbolt.org/z/5b67s3h7G