Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71053 - in trunk/boost: . concept/detail
From: steven_at_[hidden]
Date: 2011-04-06 18:26:43


Author: steven_watanabe
Date: 2011-04-06 18:26:42 EDT (Wed, 06 Apr 2011)
New Revision: 71053
URL: http://svn.boost.org/trac/boost/changeset/71053

Log:
Supress msvc warnings. Fixes #5102.
Text files modified:
   trunk/boost/concept/detail/msvc.hpp | 9 +++++++++
   trunk/boost/concept_check.hpp | 18 ++++++++++--------
   2 files changed, 19 insertions(+), 8 deletions(-)

Modified: trunk/boost/concept/detail/msvc.hpp
==============================================================================
--- trunk/boost/concept/detail/msvc.hpp (original)
+++ trunk/boost/concept/detail/msvc.hpp 2011-04-06 18:26:42 EDT (Wed, 06 Apr 2011)
@@ -6,12 +6,17 @@
 
 # include <boost/preprocessor/cat.hpp>
 # include <boost/concept/detail/backward_compatibility.hpp>
+# include <boost/config.hpp>
 
 # ifdef BOOST_OLD_CONCEPT_SUPPORT
 # include <boost/concept/detail/has_constraints.hpp>
 # include <boost/mpl/if.hpp>
 # endif
 
+# ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4100)
+# endif
 
 namespace boost { namespace concepts {
 
@@ -111,4 +116,8 @@
 # endif
 }}
 
+# ifdef BOOST_MSVC
+# pragma warning(pop)
+# endif
+
 #endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP

Modified: trunk/boost/concept_check.hpp
==============================================================================
--- trunk/boost/concept_check.hpp (original)
+++ trunk/boost/concept_check.hpp 2011-04-06 18:26:42 EDT (Wed, 06 Apr 2011)
@@ -32,6 +32,12 @@
 # include <boost/concept/usage.hpp>
 # include <boost/concept/detail/concept_def.hpp>
 
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4510 ) // default constructor could not be generated
+# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required
+#endif
+
 namespace boost
 {
 
@@ -175,11 +181,6 @@
     TT b;
   };
 
-#if (defined _MSC_VER)
-# pragma warning( push )
-# pragma warning( disable : 4510 ) // default constructor could not be generated
-# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required
-#endif
   // The SGI STL version of Assignable requires copy constructor and operator=
   BOOST_concept(SGIAssignable,(TT))
   {
@@ -202,9 +203,6 @@
     TT a;
     TT b;
   };
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#endif
 
   BOOST_concept(Convertible,(X)(Y))
   {
@@ -1077,6 +1075,10 @@
   };
 } // namespace boost
 
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+
 # include <boost/concept/detail/concept_undef.hpp>
 
 #endif // BOOST_CONCEPT_CHECKS_HPP


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