This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
swap / iter_swap consistency, and brief introduction
- From: chris <caj at cs dot york dot ac dot uk>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 24 Aug 2004 16:36:18 +0100
- Subject: swap / iter_swap consistency, and brief introduction
Relating toswap / iter_swap discussions, I see that in some places
swap(*a,*b); is being used in places where iter_swap should perhaps be
used (in rotate and __partition. __partition is particularily bad as the
ForwardIterator case uses swap() and the BidirectionalIterator case uses
iter_swap()).
In these cases we know that the types given are the same, so the
"iter_swap can take different types" problem doesn't arise. However it
would I assume be sensible to syncronise on one or the other.. (if
iter_swap was changed to use swap then iter_swap would be the obvious
choice.. if not it might require more thought).
Chris