C++ template and Function Pointer issue

Hello,

I am trying to pass a double templated C++ function as function pointer to a C system. The underling system takes function pointer of the form
 
void (*)(void **, void *)


When I try to pass some member function that is templated on itself and the enclosing call. I dont know how to specify template parameters for each type of template parameters.

To demonstrate this, I write a simple c++ template class

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
template <typename T1, typename T2>
class Abc
{
   ....
   template<typename T3>
   void abc(void **buf, void *arg)
   {
      ....
   }

   ...
   void MakeCall()
   { 
      ...  st;
      st.cpu_pointer = abc<float>; // gives error on this line, specifying only for function template??
   }
}
I have a feeling it's more because abc is a member function than that it is a template function.
You won't be able to pass a member function (even non-templated) as a function pointer through that signature.

If abc() were a static function, then the syntax would be

 
Abc<T1,T2>::abc<T3>


substituting your real types for T1, T2, T3.
Topic archived. No new replies allowed.