[Patch/RFC] libstdc++/19495

Paolo Carlini pcarlini@suse.de
Thu Jan 20 10:00:00 GMT 2005


Benjamin Kosnik wrote:

>Paolo, I think this is reasonable.
>
Thanks.

>>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)...

Paolo.



More information about the Libstdc++ mailing list