Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2002-09-28 01:55:37


Couldn't we just use a

        return static_cast<unsigned char>( x ^ int_expression )

to safely shut the compiler up? Of course, "x" is an unsigned char so
maybe it needs to be converted too.

On Thursday, September 26, 2002, at 02:38 AM, Björn Karlsson wrote:

> Indeed :-), this issue is present on my map. However, we should give
> the
> author/maintainer a fair chance (read: a few days) to respond, and take
> appropriate action. In this particular case (and AFAICT), the patch is
> a
> workaround for a compiler - this is arithmetic with unsigned integral
> types,
> which is guaranteed not to overflow; the compiler is doing something it
> shouldn't, and the code is perfectly legal (this doesn't mean that
> it's less
> annoying for the user, but it does matter).

Daryle Walker


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