Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2018-11-28 00:56:12
On Tue, Nov 27, 2018 at 3:44 PM Gavin Lambert via Boost <
> As should hopefully be obvious, implicit narrowing conversions are never
> a good idea.
short x = f();
short y = x+1; //Implicit conversion from int to short.
Do you think the compiler should warn in this case? Is the version below
short y = static_cast<short>(x+1);