
11 Nov
2009
11 Nov
'09
7:51 p.m.
On Wed, Nov 11, 2009 at 10:37 AM, Paul A. Bristow <pbristow@hetp.u-net.com> 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