[Patch] Implement Option 3 of DR 431
Paolo Carlini
pcarlini@suse.de
Tue Dec 20 20:48:00 GMT 2005
Howard Hinnant wrote:
> Caution for mainline: C++03 allocators are not required to be
> swappable (they have copyconstructible but lack copyassignable). In
> practice this doesn't appear to be a major problem, and can be easily
> fixed by adding a swap to your non-assignable allocator. Just thought
> I'd better mention it.
I know about that, of course, and we already discussed the issue a bit.
Given that otherwise container::swap is totally broken for unequal
allocators, and your analysis in N1599, it's the best we can do... well
you agree of course ;) and Gaby too. Maybe, additionally to mentioning
DR 431 in the docs, as we usually do by default for implemented DRs, we
can also add a note to the 4.2 release notes, but we have got time for
that. If nobody objects, I'm definitely going to commit this work to
mainline too.
Paolo.
More information about the Libstdc++
mailing list