Boost logo

Boost :

Subject: Re: [boost] Official warnings policy?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-11-11 14:51:29

On Wed, Nov 11, 2009 at 10:37 AM, Paul A. Bristow
<pbristow_at_[hidden]> wrote:
> And perhaps users should do this too?  The static_cast documents that the author
> has thought about this.

If a compiler warns about a potentially unsafe implicit conversion,
the following actions would document that the author has thought about

- #pragma warning
- comment in the code
- assert(x>0) before a signed/unsigned mismatch warning

Using static_cast has side effects beyond silencing the warning.

Emil Dotchevski
Reverge Studios, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at