https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78231
Bug ID: 78231 Summary: Should std::sort use unqualifed iter_swap? Product: gcc Version: 6.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: correaa at llnl dot gov Target Milestone: --- Currently `std::sort` uses `std::iter_swap` internally. I think it is more correct to use an unqualified `iter_swap` (after a `using std::swap_iter` line). This way, special iterators can be specialize the way they are value-swapped in `std::sort` without touching the namespace `std`. (analogous to the case of `std::swap` vs `swap`). It sounds that the standard is vague regarding this issue. See for example, line 1411 in https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a01347.html note: this may be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20577