------- Additional Comments From pcarlini at suse dot de 2005-01-19 10:05 ------- Well, I can see that basic_string default allocator, std::allocator<CharT> according to the standard shall return memory only aligned as CharT requests, not more; whereas our implementation of std::allocator provides stronger alignment guarantees. But I can also see that the general requirements in the standard for allocators do *not* talk about alignment at all...
Therefore, probably, it would be nice if basic_string could make use of memory only aligned as CharT wants, not more, but, AFAICS, this principle is not present in the original design. I don't think we can implement it now, for 4.0, without changing the ABI. I think we should just document that for our current basic_string memory rerurned by the allocator should be maximally aligned (in some cases less aligned is ok, but details become tricky to spell out). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495