Boost logo

Boost :

Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-11-24 11:47:16

On 11/24/18 2:44 PM, Jayesh Badwaik via Boost wrote:
> 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.

This changes the semantics of the comparison.

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