3 ms·
> The C++ compiler and the C++ standard library exist as separate components this is not really true. Aside from the fact that the standard library need not be
by gpderetta 4y ago
> The C++ compiler and the C++ standard library exist as separate components
this is not really true. Aside from the fact that the standard library need not be a library at all and could just be built-in, in practice the standard library provided by a compiler is intimately tied with that (specific version of the) compiler. libstdc++ uses plenty of GCC specific non-standard extensions and relies on implementation specific and often undocumented behaviour.
Clang tries to implement all the same extensions and GCC developers try not to break clang support too often (sometimes even providing clang specific workarounds or gating out non-implemented features), but as you have experienced, breakage does happen form time to time.
- jeffbee 4y agoIn this case the breakage is not caused by extensions, though. It's caused by a bug in the C++20 support in clang, at least according to the GNU people.