// PR c++/37177 template struct A { }; template void operator+(T, T); // { dg-error "6:.void operator\\+\\(T, T\\) \\\[with T = int\\\]. must have an argument of class or enumerated type" } int main() { operator+; // { dg-error "cannot resolve" } }