This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60448] swap_ranges does not use ADL correctly
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Mar 2014 16:58:56 +0000
- Subject: [Bug libstdc++/60448] swap_ranges does not use ADL correctly
- Auto-submitted: auto-generated
- References: <bug-60448-4 at http dot gcc dot gnu dot org/bugzilla/>
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...