Especially for templates we need to check at some point if the base
function matches the specialization we might call instead. Before this
lead to the replacement of std::sqrt(int(2)) calls with one that
converts the argument to a std::complex<int>, clearly not the desired
behavior.
Reported as PR47655