mercredi 3 avril 2019

typedef function pointer having templatized parameter

I want to create a function pointer for the method signature having Template as a parameter

Template<class T>
typedef int (*computeSizeFunc)(T data);

I tried this, and this is the error

 error: template declaration of 'typedef'
 typedef  int (*computeSizeFunc)(T data).

This is the method signature for which I am trying to write Function Pointer

template<class T>
int getSize (T data)

Aucun commentaire:

Enregistrer un commentaire