But static_cast
from const char *
to CPVOID
, which is typedef const void *
, is seamless.
Is there some difference between const PVOID
and CPVOID
, that I don't understand?
Code:
typedef void * PVOID;
typedef const void * CPVOID;
int main()
{
const char * c = nullptr;
CPVOID e = static_cast<CPVOID>(c); // Ok
const PVOID f = static_cast<const PVOID>(c); // Error
}