In c++ it is allowed to create a template on functions, both member and free
template <void (*F) ()> void function1 ();
template <void (MyClass::*M) ()> void function2 ();
and instantiate them explicitly
function1 <&fn> ();
function2 <&MyClass::doSomething> ();
my question is, if the template arguments themselves are instantiated from templates
template <typename R, typename C, R (C::*M) ()> void function3 ();
how do I instantiate function3 explicitly (if even possible)?
Just do:
The syntax is just the same in this case as in the other cases.
Complete compilable example:
Prints: