What exactly are the libcxx ABI guarantees?

This isn’t at all a noob question. This is in fact a very hard question, and we are working on improving the answer. In general, there shouldn’t be issues switching between C++ versions. Though there are a few cases where it can be problematic. e.g. std::accumulate is in C++20 defined to move the accumulation object instead of copying it. This results in at least an observable behaviour change, but that should at least not bring down your program, since the linker will discard one version, and the other should still do about the same thing. Compiling against different libc++ versions is also fine. RTTI and exceptions are much more problematic, since they have behaviour changes that aren’t just “it’s technically not conforming”. Mixing these configurations could potentially result in memory leaks or worse. Though many people still mix them, so your mileage may vary. If there aren’t any exceptions thrown it’s probably fine™. I’m not sure what linker flags you have in mind, but I don’t think that should matter much.

2 Likes