// Verify we check arity early before deduction without explicit // template arguments. template struct A; template struct B : A { }; template void f(A&, int); // #1 template void f(B&); // #2 int main() { extern B b; ::f(b); // OK, deduction for #1 short-circuited and B not instantiated, // which would have resulted in a hard error }