summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/trailing4.C
blob: 247efd4b56cb8dcc0cb480a30fe382d801234101 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/38597
// { dg-options "-std=c++0x" }

template<class T, class U>
auto f(T,U) -> decltype(T() + U())
{ return T() + U(); }

template<class T> void g(T){}	// { dg-message "candidate" }

int main() { g(f); }		// { dg-error "no matching function" }