Debian Codegraph @

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

raw
1 // { dg-do compile }
2
3 template<void (*P)()>
4 void wrap() {
5 P(); // OK, despite A::g not being accessible from here.
6 }
7
8 struct A {
9 static void f() {
10 wrap<A::g>();
11 }
12 private:
13 static void g();
14 };