Debian Codegraph @

gcc/testsuite/g++.dg/template/fn-ptr3.C

raw
1 // PR c++/53164
2 // PR c++/105848
3 // { dg-do link }
4
5 template<class T>
6 void f(T) { }
7
8 template<void (*P)(int)>
9 struct A {
10 static void wrap() {
11 P(0);
12 }
13 };
14
15 template<void (*P)(char)>
16 void wrap() {
17 P(0);
18 }
19
20 template<int>
21 void g() {
22 A<f>::wrap();
23 wrap<f>();
24 }
25
26 int main() {
27 g<0>();
28 }