This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Thu, May 20, 2010 at 11:27 AM, Ian Lance Taylor <iant@google.com> wrote:
> 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?

The GNU extension of strong namespaces is the earlier incarnation of
inline namespace -- only the syntax syntax changed, with a few tweaks
to the rules.

Those features were explicitly motivated by versioning and ability to have
several flavours of the library coexist in the same program without
violating the ODR.

Benjamin and Jason have more to say.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]