https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116876
--- Comment #4 from Jason Liam <jlame646 at gmail dot com> --- > So are you sure this is not a clang issue? Yes, because [temp.deduct.partial#9.1] make the second overload not to be atleast as specialized as the first and then [temp.deduct.partial#9.2] make the first template not to be atleast as specialized as the second. So neither overloads are at least as specialized than the other and hence also **neither of them more specialized**. This was explained in the thread link I posted in the original bug: https://stackoverflow.com/a/79034540/12002570 Now coming to the example you gave where we have changed the second overload to `f(T&&)`, this starts working because then the [temp.deduct.partial#9.2] will no longer apply and we will get on of the overloads more specialized than the other.