
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: Wednesday, November 18, 2009 3:10 PM To: boost@lists.boost.org 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@hetp.u-net.com