1 2 3 4 5 6 7 8 9 10 11 12 13 14
struct A {}; struct B : public A { static void foo (); }; template <typename T> struct C { C() : f(B::foo) {} void (*f)(); }; C<int> c;