[RFC] C++1x breaking the ABI in one more place :(

Ian Lance Taylor iant@google.com
Thu May 20 16:27:00 GMT 2010


Mark Mitchell <mark@codesourcery.com> writes:

> I'm happy to be proved wrong here!  If we can make a single library that
> can magically work with old and new shared objects at the same time,
> that's great!  But, if we can't, we shouldn't gradually morph the
> library, introducing lots of little incompatibilities.  Better to have
> one big one.

I agree with that.  But before we do the big break, can we develop a
scheme which will permit us to avoid big breaks in the future?  It's
been painful to be unable to change class definitions.

If I understand C++0x inline namespaces, it does seem that they could
be used for that purpose.  It would mean that the new class would have
a longer mangled name, but so it goes.  But it also seems like C++0x
inline namespaces have an effect similar to that of the existing GNU
extension of strong namespaces.  Is there any reason we could not use
that today to introduce ABI breaking versions of classes?

Ian



More information about the Libstdc++ mailing list