
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Daniel James Sent: Thursday, November 26, 2009 11:07 PM To: boost@lists.boost.org Subject: Re: [boost] warning policy issue
There are a few warning conditions in Visual C++ 7.1 that were removed in later versions. I think their removal is a good indication of their worth (the ones I've come across were certainly buggy). They should probably just be suppressed with something like the following.
#if defined(BOOST_MSVC) #pragma warning(push) #if BOOST_MSVC < 1400 #pragma warning(disable:4244) #endif #endif
// ....
#if defined(BOOST_MSVC) #pragma warning(pop) #endif
If the problem is only with version 7.1, I agree this is the best policy. The https://svn.boost.org/trac/boost/wiki/Guidelines/MaintenanceGuidelines effectively suggest this (but using the BOOST_WORKAROUND macro) " If the warning is only for a specific compiler version, use this approach: #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(push) #pragma warning(disable:4512) //assignment operator could not be generated #endif ... #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(pop) #endif " Does anyone have a problem with this guidance? Paul --- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow@hetp.u-net.com