https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111261
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > In fact with trunk we diagnose this properly with -std=c++17 but not > -std=c++20. So it's probably because c++17 uses extern template for std::string and C++20 doesn't. This could probably be done in the front end. The rule about init order is purely lexical, and so if the initializer odr-uses another member declared later, we should warn.