Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49756 - trunk/boost/unordered
From: daniel_james_at_[hidden]
Date: 2008-11-14 11:11:17


Author: danieljames
Date: 2008-11-14 11:11:16 EST (Fri, 14 Nov 2008)
New Revision: 49756
URL: http://svn.boost.org/trac/boost/changeset/49756

Log:
Use pragmas to suppress a Visual C++ warning.
Text files modified:
   trunk/boost/unordered/unordered_map.hpp | 13 +++++++++++++
   trunk/boost/unordered/unordered_set.hpp | 13 +++++++++++++
   2 files changed, 26 insertions(+), 0 deletions(-)

Modified: trunk/boost/unordered/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map.hpp (original)
+++ trunk/boost/unordered/unordered_map.hpp 2008-11-14 11:11:16 EST (Fri, 14 Nov 2008)
@@ -21,6 +21,15 @@
 #include <boost/unordered/detail/move.hpp>
 #endif
 
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4396) //the inline specifier cannot be used when a
+ // friend declaration refers to a specialization
+ // of a function template
+#endif
+#endif
+
 namespace boost
 {
     template <class Key, class T, class Hash, class Pred, class Alloc>
@@ -785,4 +794,8 @@
 
 } // namespace boost
 
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED

Modified: trunk/boost/unordered/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set.hpp (original)
+++ trunk/boost/unordered/unordered_set.hpp 2008-11-14 11:11:16 EST (Fri, 14 Nov 2008)
@@ -21,6 +21,15 @@
 #include <boost/unordered/detail/move.hpp>
 #endif
 
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4396) //the inline specifier cannot be used when a
+ // friend declaration refers to a specialization
+ // of a function template
+#endif
+#endif
+
 namespace boost
 {
     template <class Value, class Hash, class Pred, class Alloc>
@@ -742,4 +751,8 @@
 
 } // namespace boost
 
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED


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