Boost logo

Boost Users :

From: Clarke, Trevor (tclarke_at_[hidden])
Date: 2005-12-14 14:32:21


There are a few places in crc.hpp where the following happens:

static value_type shift( value_type rem )

            { return rem << CHAR_BIT; }

 

The problem is, if run time checking is active in VS2003 (I assume 2005
has the same issue), a pop-up warning is issued during every call to the
function as data is lost. (that's the intent in fact). The fix is to
mask (rem << CHAR_BIT) & 0xffff (or whatever the appropriate mask value
is for value_type). Is this a known issue? It's technically not a bug
but could cause some annoyances for anybody using rtc. Should this be
changed?

------------------------------

Trevor R.H. Clarke

tclarke at ball com <mailto:tclarke_at_[hidden]>

Ball Aerospace & Technologies Corp

 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net