I am having a pointer to the common static method
class MyClass
{
private:
static double ( *pfunction ) ( const Object *, const Object *);
...
};
<
One thing you can do is have a copy of the template member function in the cpp file and point to that i.e.
template <+typename ElementType>
int PQueueHeap::compareFunction(ElementType First,ElementType Second)
{
if (First>Second) return 1; else if (First==Second) return 0; else return -1;
}
// you cannot point to above
however you can point to
template <+typename ElementType>
int compareFunction(ElementType First,ElementType Second)
{
if (First>Second) return 1; else if (First==Second) return 0; else return -1;
} // No error and it works!