template typedef , template on the return type ?

 

This is possible ? 

To have a template on the return type on the function pointer

struct database{
double doubles[];
int    integers[];
       
double get_double_value(int i){
return(doubles[i]);
}
int get_integer_value(int i){
return(integers[i]);
}
};

int global_integer(int i){
return(i);
}
template <typename ANYTYPE>
typedef ANYTYPE (*ANYFUNCTION)(int);

class ptr{
public:
ANYFUNCTION call_this;
      ptr(void){call_this=NULL;}
 void set(ANYFUNCTION set_as_this){
      call_this=set_as_this;
      }
};
//------------------------------------------------------------------
template <typename ANYTYPE>
string get_function_typename(ANYTYPE value){
       return(typename(value));
       }
int OnInit()
  {
//---
  //test one get typename of return after set ? 
    ptr P;
    database DB;
    P.set(DB.get_integer_value);
    delete(GetPointer(P));
  
//---
   return(INIT_SUCCEEDED);
  }