Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/trailing4.C

raw
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
8 template<class T> void g(T){} // { dg-message "note" }
9
10 int main() { g(f); } // { dg-error "no matching function" }
11 // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
12