3 ms·
Because the C++ ABI is fragile, in practice you need a blessed library ABI for the standard library. On linux for example it is libstdc++ which has been stable
by gpderetta 4y ago
Because the C++ ABI is fragile, in practice you need a blessed library ABI for the standard library. On linux for example it is libstdc++ which has been stable for almost 20 years (yes, there was a brakeage around c++11, but there are compatible shims for backward compat). Clang and the intel compiler can compile against libstdc++.
- not2b 4y agoNo, this isn't because the C++ ABI is fragile, but because the standard library wasn't part of its scope. It only covers the layout of objects and how parameters are passed to function calls, and does not cover the implementation details of standard classes. There are competing, incompatible standard libraries.
- gpderetta 4y agowell, the ABI doc says: We have not attempted to constrain the interface [of the standard library] at this level, because we do not consider doing so feasible at this time So it wasn't necessarily out of scope, it was just hard to do. I think the reason they don't consider it feasible, is because the C++ ABI would constrain the implementation significantly and there was too much divergence already.