https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- Ah, maybe the friend function is not quite a template, so the generated swapped function is not a template either, and thus it has priority over a template if both are exact matches? This is going to break a number of users of boost/operators.hpp, and possibly other mixins using a similar technique.