https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86142
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> --- Looks ever since r10-2197, GCC 10 correctly performs SFINAE for the first two overloaded calls. But could you explain why int z = f<void*>(); should resolve to the second overload of f? My understanding is that 'delete' on a pointer to void is undefined behavior, but is not ill-formed, so there is no substitution failure and we should select the first overload.