Overload resolution involving trailing template parameter packs

Clang 16 implements DR692/DR1395/DR1432. As a side effect, it correctly implements that only function parameters that have arguments participate in the partial ordering. ([temp.deduct.partial], [temp.func.order]). Below is one example that was incorrectly accepted before but now is diagnosed as ambiguous:

template<class T, class U> struct A { };

template<class T         > void g(T, T = T());
template<class T, class... U> void g(T, U ...);

void h() {
  g(42); // error: ambiguous
}