// { dg-do assemble } template struct S {}; template void foo(S); // { dg-message "note" } void bar() { foo(S<3>()); // { dg-error "" } no way to deduce J from this. // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 11 } }