This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

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


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.

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