C99/C++11 标准是否保证sizeof(size_t) == sizeof(void*)
始终正确?
size_t f(void* p)
{
return (size_t)(p); // Is it safe?
}
void* f(size_t n)
{
return (void*)(n); // Is it safe?
}
C99/C++11 标准是否保证sizeof(size_t) == sizeof(void*)
始终正确?
size_t f(void* p)
{
return (size_t)(p); // Is it safe?
}
void* f(size_t n)
{
return (void*)(n); // Is it safe?
}