This is the mail archive of the
mailing list for the libstdc++ project.
Why doesn't iter_swap use swap?
- From: chris <caj at cs dot york dot ac dot uk>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 22 Aug 2004 09:40:25 +0100
- Subject: Why doesn't iter_swap use swap?
I suspect this might have a simple answer, but why doesn't iter_swap use
swap? I can't see any immediate disadvantages to this, and it would have
the major advantage that any specialisations of swap would then be used
by iter_swap (which is how I discovered the problem, while trying to
overload swap and then wondering why it wasn't getting used by reverse
and other algorithms...)