jeudi 6 février 2020

error: reference to overloaded function could not be resolved; did you mean to call it?

The below code

hError_t hOccupy(
int* numB, const void* f, int bS, size_t dyn);


#ifdef __cplusplus

template <class T>
inline hError_t hOccupy(
int* numB, T f, int bS, size_t dyn) {
return hOccupy(
    numB, reinterpret_cast<const void*>(f), bS, dyn);
}
#endif 

int main(int argc, char *argv[]) {

decltype(&hOccupy) f = &hOccupy;

return 0;
}

gives the error

 error: reference to overloaded function could not be resolved; did you mean to call it?

Can anyone suggest whats wrong here and how to overcome it.

Aucun commentaire:

Enregistrer un commentaire