Hacker News new | ask | show | jobs
by aw1621107 29 days ago
> 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?

1 comments

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?