[v3] C++11 allocator reqs for vector in debug & profile mode

Jonathan Wakely jwakely.gcc@gmail.com
Wed Nov 9 09:16:00 GMT 2011


On 9 November 2011 08:14, Jonathan Wakely wrote:
> On 9 November 2011 01:44, Paolo Carlini wrote:
>> On 11/09/2011 02:28 AM, Jonathan Wakely wrote:
>>>
>>> This adds C++11 allocator support to vector in debug mode and profile
>>> mode.
>>
>> Great. By the way, pardon my laziness, how are we doing on that old issue
>> with vector<>::shrink_to_fit, in normal-mode and debug-mode vs statefull
>> allocators too? All done?
>
>
> Hmm, I don't remember, I'll have to check.

I checked, and it's currently broken :)

We do the wrong thing for allocators with propagate_on_container_swap==true.

I think the fix might be as simple as constructing the new container
with a copy of the old one's allocator, so even if it gets swapped
it's equal.

I'll deal with it asap.



More information about the Libstdc++ mailing list