I’m unable to prevent this warning..
...\boost\asio\impl\io_service.ipp(46) : warning C4267: 'argument' : conversion from 'size_t' to 'std::numeric_limits<unsigned int>::_Ty', possible loss of data
Perhaps you got
- An explanation for this
- The solution to prevent the throwing 🙂
kindly,
alex
Suspect this is a 64-bit build and
size_twill be 64-bit andunsigned intwill be 32-bit:Add the compiler flag
/Wd4267to disable this warning. However, that would disable the warning for all sources in your project which you may dislike. An alternative is to use#pragma warning: