Boost logo

Boost Users :

Subject: [Boost-users] [Multi-Index] Suppressing warnings in VS2005 (VC8)
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2009-04-07 13:18:11


(I'm not sure this is strictly related to Multi-Index in fact)

Hi. If I

#include <boost/multi_index_container.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/composite_key.hpp>
#include <boost/multi_index/mem_fun.hpp>

I get

boost\detail\allocator_utilities.hpp(182) : warning C4100: 'p' :
unreferenced formal parameter

(we compile with a low threshold for warnings)

If I try to suppress it with:

#if defined(_WIN32) && defined( _MSC_VER )
#pragma warning(push)
#pragma warning(disable : 4100) // unreferenced formal parameter
#endif
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/composite_key.hpp>
#include <boost/multi_index/mem_fun.hpp>
#if defined(_WIN32) && defined( _MSC_VER )
#pragma warning(pop)
#endif

I get even more warnings (way more). I suspect that I'm getting in the
way of a built-in mechanism in Boost to suppress warnings with my own
#pragma warning push/pop.

So my question is how I can suppress this one little warning (well,
because of the instantiation trail of the B.MI, it's a 65 lines
"little" warning...) without disabling Boost's own warning
suppression?

Thanks, --DD


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net