error C2440: ‘static_cast’ : cannot convert from ‘~’ to ‘~’