
I want to compute the Crc32 checksum of a bunch of bytes. To do so, I simply use crc_32_type and process_bytes. Unfortunately this does not work in debug mode. Visual Studio (2008) breaks at line 574 of crc.hpp. // Compare a byte to the remainder's highest byte static unsigned char index( value_type rem, unsigned char x ) { return x ^ rem; } Error message: Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. If this was intentional, you should mask the source of the cast with the appropriate bitmask. For example: char c = (i & 0xFF); Changing the code in this way will not affect the quality of the resulting optimized code. I do not like changing the boost source code, so what can I do to workaround this problem?