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++/60448] swap_ranges does not use ADL correctly


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60448

--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #6)
> libc++ sfinae constrains std::swap.

More precisely: they do have swap declared before iter_swap, if you remove the
=delete it is ambiguous with libc++ as well, it just happens that the template
constraints disable the std swap in this particular case.

So I don't think libstdc++ is doing anything wrong.

I don't understand why ADL should get this to work. No function is more
specialized than the other, and ADL doesn't disable unqualified lookup. But
then again I am bad at understanding this text, it looks to me like it says ADL
shouldn't even happen, which is clearly not the case...


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