Boost logo

Boost :

Subject: Re: [boost] Official warnings policy?
From: Richard Webb (richard.webb_at_[hidden])
Date: 2009-11-11 15:27:50

Steven Watanabe-4 wrote:
> I'd be careful about adding a static_cast, since it changes exactly
> what's being tested. Part of the behavior of a class is the way it
> handles
> implicit conversions. Even conversions that generate warnings sometimes
> need to be tested.

There are a few of these type of warnings, at least some of which are
'intentional', as you say. For example, the variant test test2.cpp does:

variant<char, const char*> v1;
const int n0 = 88;
v1 = n0;

With the comment "Implicit conversion to bounded type", so you don't want to
be explicitly casting the int to a char to avoid the warning.

View this message in context:
Sent from the Boost - Dev mailing list archive at

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