https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97885
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- The bug reporting guidelines require the code to be provided here, not just via URL to some other site. See https://gcc.gnu.org/bugs/ GCC is right to say this is ambiguous. The overloads do not have equivalent template parameters and function parameters, so we should not compare the constraints to see which is "more constrained". In this case one takes its argument by value and one takes its argument by reference. Change the first one to f(weak_same<A> auto&&) and it will be more constrained. The change between gcc-10.1 and gcc-10.2 was done by g:c3d4dbc68be1484294143a3d0e0d86034e9aa883 and the commit log for that change refers to https://wg21.link/p2113