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]

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


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