title: C++, function pointer to the template function pointer
body: <p>I am having a pointer to the common static method</p>
  
  <pre><code>class MyClass
  {
    private:
      static double ( *pfunction ) ( const Object *, const Object *);
      ...
  };
  </code></pre>
  
  <p>pointing to the static method</p>
  
  <pre><code> class SomeClass
   {
    public:
      static double getA ( const Object *o1, const Object *o2);
      ...
   };
  </code></pre>
  
  <p>Initialization:</p>
  
  <pre><code>double ( *MyClass::pfunction ) ( const Object *o1, const Object *o2 )  = &amp;SomeClass::getA;
  </code></pre>
  
  <p>I would like to convert this pointer to the static template function pointer:</p>
  
  <pre><code>template &lt;class T&gt;
  static T ( *pfunction ) ( const Object &lt;T&gt; *, const Object &lt;T&gt; *); //Compile error
  </code></pre>
  
  <p>where:</p>
  
  <pre><code> class SomeClass
   {
    public:
      template &lt;class T&gt;
      static double getA ( const Object &lt;T&gt; *o1, const Object &lt;T&gt; *o2);
      ...
   };
  </code></pre>
  
  <p>But there is the following compile error: </p>
  
  <pre><code>error: template declaration of : T (* pfunction )(const Object &lt;T&gt; *o1, const Object &lt;T&gt; *o2)
  </code></pre>
  
  <p>Thanks for your help...</p>