What is the C++ (14) syntax to initialise a pointer to an instantiated template friend function? Minimal example below. Thanks.
template <class template_param>
struct TYPE
{
friend TYPE foo ( TYPE &, TYPE & ) { TYPE res; return res; }
friend TYPE bar ( TYPE &, TYPE & ) { TYPE res; return res; }
};
struct CLASS
{
typedef TYPE<int> (*ptr_to_function) ( TYPE<int>, TYPE<int> );
ptr_to_function * ptr_to_foo = foo; // What syntax is required here, or elsewhere,
ptr_to_function * ptr_to_bar = bar; // to set pointers to functions above?
void calculate () {
procedure ( ptr_to_bar );
procedure ( ptr_to_foo );
}
void procedure ( ptr_to_function * fun ) { /* Use foo or bar via fun */ }
};