This is the mail archive of the 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/RFC] libstdc++/19495

Benjamin Kosnik wrote:

Paolo, I think this is reasonable.


For 4.1, or when the ABI can change, anyway, we can consider changing
basic_string to make use of memory aligned only as CharT requires, not
more, but, for the time being, the below seems to me a viable approach...

Opinions? Disagreements?

For so_7, we really need to come up with some changes for std::string.

For one, we have to have link-time differences for various Reps. It's
the only way we are going to be able to do shared allocation strings.

100% agreed. Summarizing, we have at least two open issues:
1- Avoiding _Rep in static memory, probably we can neatly obtain that via a "short-string optimization" type solution.
2- Various alignment issues (the last one manifest itself slightly differently than the the very old one).

In order to fix 2-, basic_string must be profoundly redesigned, as soon as 4.0 branches (and the 4.0 version of type_traits is more or less final) I really want to seriously start on this big project. If we are lucky, the new design will not be blocked too seriously by __attribute__(aligned)...


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