C++ Logo


Advanced search

Re: [SG15] [isocpp-ext] Modularization of the standard library and ABI stability

From: Bryce Adelstein Lelbach aka wash <brycelelbach_at_[hidden]>
Date: Sun, 8 Mar 2020 21:48:28 -0700
What is the benefit of modularizing the standard library in C++23, given
that standard library headers (modulo a few like <cassert>) are already

On Sun, Mar 8, 2020, 21:31 Michael Spencer <bigcheesegs_at_[hidden]> wrote:

> On Sun, Mar 8, 2020 at 2:01 PM Bryce Adelstein Lelbach aka wash via Ext <
> ext_at_[hidden]> wrote:
>> Do we have any ABI stability concerns regarding modularizing the standard
>> library? Certainly for strong module ownership implementations, this is a
>> concern, but for weak module ownership implementations it may be a concern
>> too, because the mangling of internal implementation details with module
>> linkage would change.
>> Can implementations overcome this with special hacks for the standard
>> library that preserve the old mangled names?
> I don't expect stdlibs to move off of headers in the foreseeable future
> (in order to support pre-modules compilers and build systems). Given this I
> expect standard library entities to remain the in global module, and thus
> the named module they are exported from to be irrelevant. If someone writes
> a new C++20+ only stdlib then they will have a different ABI anyway, but
> there would then be potential ABI breakage from moving an entity. However,
> it is not observable which module an entity is from, so it's quite easy to
> work around any ABI changes that would occur due to moving where an entity
> is. I seriously doubt we would remove a declaration from a module without
> removing the declaration entirely though, which is the only way you would
> end up needing to change which module owns it.
> - Michael Spencer

Received on 2020-03-08 23:51:26