This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Implement Option 3 of DR 431
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.