// PR c++/40371 struct A { typedef void (&F)(); template operator F(); }; void foo() { A()(); // { dg-error "no match" } }