Debian Codegraph @

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

raw
1 // { dg-do compile { target c++11 } }
2 // PR c++/69056
3
4 template <typename T, typename... Args>
5 void resolver(int (*) (T, Args...));
6
7 int funcA(int, float) { return 0; }
8 int funcA(double) { return 0; }
9
10 int funcB(int, float, char) { return 0; }
11 int funcB(int, bool) { return 0; }
12 int funcB(double) { return 0; }
13
14 int funcC(int) { return 0; }
15 int funcC(double) { return 0; }
16
17 void
18 foo (void)
19 {
20 resolver (&funcA); // { dg-error "no match" }
21 resolver<int> (&funcA);
22 resolver<double> (&funcA);
23
24 resolver<int> (&funcB); // { dg-error "no match" }
25 resolver<int, char> (&funcB); // { dg-error "no match" }
26 resolver<int, float> (&funcB);
27
28 resolver<int> (&funcC);
29 resolver<int, float> (&funcC); // { dg-error "no match" }
30 }