[Bug libstdc++/78231] Should std::sort use unqualifed iter_swap?

2016-11-07 Thread correaa at llnl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78231 --- Comment #4 from Alfredo --- ok, thanks for the clarification. So algorithms on iterators that swap use `::std::iter_swap`? (I didn't know that.) That is step forward. Is then one allowed to overload/specialize `std::iter_swap`? Just like o

[Bug libstdc++/78231] Should std::sort use unqualifed iter_swap?

2016-11-07 Thread correaa at llnl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78231 --- Comment #2 from Alfredo --- @Jonathan, Can you link to the part of the line in the standard? I found that standard to be very vague, for example in defining ValueSwappable. Is ValueSwappable something that can be called with `std::iter_swap`,

[Bug libstdc++/78231] New: Should std::sort use unqualifed iter_swap?

2016-11-07 Thread correaa at llnl dot gov
: 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