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: [patch] libstdc++/56785 reduce space overhead of nested tuples


On 17 January 2015 at 08:49, Marc Glisse wrote:
> Hello,
>
> just checking that I understand how it works. std::tuple did not exist in
> C++03, so its ABI was not fixed, and you don't need to set abi_tag on it and
> on all the tuple users in libstdc++, which are also new in C++11.

Right. Anything depending on it must be recompiled anyway when moving
from a previous release to GCC 5.

The plan is to stop that requirement with GCC5, so that we declare the
types stable and it won't be necessary to recompile all C++11 code
when moving from 5 to a later release.


> What about std::rotate in a different patch though? As I understand it,
> changing the return type does not affect the mangling, and if we use the new
> function (and its return value) and link with older code that has the old
> function, if the linker picks the old function, bad things may happen, no?

That's true. We don't need an abi_tag (that's needed for classes as
they can be used as bases or members and alter the class layout
without affecting the mangled name) but the new definition of
std::rotate should be in the inline namespace _V2 that we've used for
a few other types, so the linker won't confuse it with the old version
returning void.


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