jeudi 30 novembre 2017

convert c style function pointer to c++11

#define CHECKED_SK_FREE_FUNC(type, p) \ void (*)(void *))> ((1 ? p : nullptr))

I am facing error when compiled with c++11 error: use of old-style cast [-Wold-style-cast]

when I tried to use c++ casting # define CHECKED_SK_FREE_FUNC(type, p) \ static_cast<(void (*)(void *))> ((1 ? p : nullptr)) error: cannot initialize a parameter of type 'void (*)(void *)' with an rvalue of type 'decltype

Aucun commentaire:

Enregistrer un commentaire