Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It's especially tragic because Clang already had the full C99 designated init feature set in C++ mode implemented long before C++20 and it worked just fine.

How did Clang handle differences between member declaration order and the order in which initializers appeared?

 help



It simply reorders them, same behaviour as in C:

https://www.godbolt.org/z/ex138rh51

(the warnings in C++ mode had only been added after C++20)


Hrm, I take it that was considered too footgun-y for the committee?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: