1 // PR c++/38597
2 // { dg-do compile { target c++11 } }
3 
4 template<class T, class U>
5 auto f(T,U) -> decltype(T() + U())
6 { return T() + U(); }
7 
g(T)8 template<class T> void g(T){}	// { dg-message "note" }
9 
main()10 int main() { g(f); }		// { dg-error "no matching function" }
11 // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
12 
13