Use just '0' instead of 'static_cast<void*>(0)' because the latter will not automatically convert to pointers to other types.