Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/auto-fn20.C

raw
1 // { dg-do compile { target c++14 } }
2
3 template <class T>
4 auto f(T) { return 42; }
5 template <class T>
6 auto g(T) { return 0.0; }
7
8 int main()
9 {
10 int (*p)(int) = &f; // OK
11 p = &g; // { dg-error "no match" }
12 }