This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/78231] Should std::sort use unqualifed iter_swap?
- From: "eric.niebler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 08 Nov 2016 17:42:37 +0000
- Subject: [Bug libstdc++/78231] Should std::sort use unqualifed iter_swap?
- Auto-submitted: auto-generated
- References: <bug-78231-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78231
Eric Niebler <eric.niebler at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eric.niebler at gmail dot com
--- Comment #6 from Eric Niebler <eric.niebler at gmail dot com> ---
Jonathan, the wording for std::reverse mentions iter_swap and doesn't seem to
say whether it is called qualified or unqualified. AFAIK, it is the only
algorithm that is required to use iter_swap. It seems to be a hold-over from a
time before time. The requires clause says that *value must be swappable, but
it doesn't *exactly* say that the call to iter_swap must resolve to the version
in namespace std that does swap(*a,*b). Please forgive me if I'm misreading the
standard.