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: [v3] add max_size and rebind to __alloc_traits


On 6 October 2011 14:14, Paolo Carlini wrote:
> On 10/06/2011 02:55 PM, Daniel Krügler wrote:
>>
>> One necessary fix seems to add a specialization
>>
>> allocator_traits<__gnu_test::uneq_allocator>::type>
>>
>> with the correct value for propagate_on_container_swap.
>> Or much easier: Define propagate_on_container_swap as static
>> member of __gnu_test::uneq_allocator.
>>
> Either of these seem to me neat ways to deal with the issue.

Yep, I haven't looked into it yet but I agree with Daniel's analysis
(except that propagate_on_container_swap must be a type, not a static
member)

We already have separate tests (using propagating_allocator) which
test the behaviour for non-equal allocators that don't propogate on
container swap, so I see no harm in changing the behaviour of
uneq_allocator by adding:

typedef true_type propagate_on_container_swap;

I won't be able to make that fix until late tonight.


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