Boost logo

Boost :

Subject: Re: [boost] [new Warnings policy] MS C4180 on the Maintenance Guidelines
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2009-11-18 11:38:07


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On
Behalf Of
> Steven Watanabe
> Sent: Wednesday, November 18, 2009 3:10 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [new Warnings policy] MS C4180 on the Maintenance
Guidelines
>
> AMDG
>
> I think the most common cause of this warning is that std::type_info::before
> (which is supposed to return bool) returns int instead.

> Also, static_cast<bool> doesn't suppress the warning.

So is the final suggestion "suppress" correct in this case?

I note boost/mpi/detail/mpi_datatype_cache.hpp Matthias Troyer writes
(complains!)

// The std::type_info::before function in Visual C++ 8.0 (and probably earlier)
// incorrectly returns an "int" instead of a "bool". Then the compiler has the
// audacity to complain when that "int" is converted to a "bool". Silence
// this warning.
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4800)
#endif

Or do what?

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal, UK   LA8 8AB
+44 1539 561830, mobile +44 7714330204
pbristow_at_[hidden]

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