aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/auto-fn20.C
blob: 818b6f5da67e7a47aa80e78125b63891b65bed22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do compile { target c++1y } }

template <class T>
auto f(T) { return 42; }
template <class T>
auto g(T) { return 0.0; }

int main()
{
  int (*p)(int) = &f; // OK
  p = &g; // { dg-error "no match" }
}