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
this:

- #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.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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