Boost logo

Boost :

Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2018-11-26 20:48:12

On Mon, Nov 26, 2018 at 6:44 AM Marshall Clow via Boost <
boost_at_[hidden]> wrote:
> For example, should the following code cause a warning to be emitted?
> auto p = std::make_unique<unsigned char>(0);
> At least one popular compiler warns on this code, complaining about a
> truncation from int --> unsigned char, and a possible loss of data.
> We spent a lot of time and effort in Boost.DateTime with this.
> See and others.

Exactly. I submit that it is neither possible or desirable to write code
that will not result in warnings on some compiler. This is trivially true,
because there is no standard for warnings.

#pragma system_header is your friend.

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