|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57542 - in trunk: boost/bind libs/bind/test
From: john_at_[hidden]
Date: 2009-11-10 08:26:44
Author: johnmaddock
Date: 2009-11-10 08:26:43 EST (Tue, 10 Nov 2009)
New Revision: 57542
URL: http://svn.boost.org/trac/boost/changeset/57542
Log:
Warning suppressions in Boost.Bind.
Fixes #3601.
Text files modified:
trunk/boost/bind/bind.hpp | 18 ++++++++++++++++++
trunk/libs/bind/test/bind_visit_test.cpp | 1 +
2 files changed, 19 insertions(+), 0 deletions(-)
Modified: trunk/boost/bind/bind.hpp
==============================================================================
--- trunk/boost/bind/bind.hpp (original)
+++ trunk/boost/bind/bind.hpp 2009-11-10 08:26:43 EST (Tue, 10 Nov 2009)
@@ -207,6 +207,13 @@
}
};
+#ifdef BOOST_MSVC
+// MSVC is bright enough to realise that the parameter rhs
+// in operator==may be unused for some template argument types:
+#pragma warning(push)
+#pragma warning(disable:4100)
+#endif
+
template< class A1 > class list1: private storage1< A1 >
{
private:
@@ -846,6 +853,10 @@
}
};
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
// bind_t
#ifndef BOOST_NO_VOID_RETURNS
@@ -1654,7 +1665,14 @@
template< class M, class T > struct add_cref< M T::*, 1 >
{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4180)
+#endif
typedef M const & type;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
};
template< class R, class T > struct add_cref< R (T::*) (), 1 >
Modified: trunk/libs/bind/test/bind_visit_test.cpp
==============================================================================
--- trunk/libs/bind/test/bind_visit_test.cpp (original)
+++ trunk/libs/bind/test/bind_visit_test.cpp 2009-11-10 08:26:43 EST (Tue, 10 Nov 2009)
@@ -5,6 +5,7 @@
# pragma warning(disable: 4710) // function not inlined
# pragma warning(disable: 4711) // function selected for automatic inline expansion
# pragma warning(disable: 4514) // unreferenced inline removed
+# pragma warning(disable: 4100) // unreferenced formal parameter (it is referenced!)
#endif
// Copyright (c) 2006 Douglas Gregor <doug.gregor_at_[hidden]>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk