Boost logo

Boost :

Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Jayesh Badwaik (badwaik.jayesh_at_[hidden])
Date: 2018-11-24 11:44:26


On Friday, 23 November 2018 20:58:44 CET Emil Dotchevski via Boost wrote:
> So you change that to:
>
> if( static_cast<unsigned>(x) < f() )

I would change the opposite, I would do

if( x < static_cast<int>(f()))

then, if the type of `x` changed in the function, I will now get a new
warning, and I can fix it.

-- 
Best
Jayesh Badwaik
https://jayeshbadwaik.github.io



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