logoalt Hacker News

aw1621107today at 1:16 PM1 replyview on HN

> 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?


Replies

flohofwoetoday at 3:26 PM

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)