Boost logo

Boost :

From: Joe Mariadassou (JMariadassou_at_[hidden])
Date: 2001-03-11 15:50:09


The test application does not compile under MSVC as compiler does not allow
static const initialisation in classes (bit_traits in this case). However
the static const values are used exactly in one place each. So it can be
declared within the function. See attached file.

Also the following test asserts:
// unsigned char const data[] = { 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37,
// 0x38, 0x39 };
// size_t const data_len = sizeof( data ) / sizeof( data[0] );
 typedef crc_fast<2, 0x8005, 0, 0, true, true> crc_16_type;
    crc_16_type crc_16_fast;
    crc_16_fast = std::for_each( data, data + data_len, crc_16_fast );
    assert( *crc_16_fast == 0xBB3D );

*crc_16_fast returns 0x2189. Maybe the test is wrong as the other tests with
crc_fast succeeds.
 
joe




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk