Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74920 - trunk/boost/type_traits/detail
From: frederic.bron_at_[hidden]
Date: 2011-10-11 16:38:22


Author: bronf
Date: 2011-10-11 16:38:20 EDT (Tue, 11 Oct 2011)
New Revision: 74920
URL: http://svn.boost.org/trac/boost/changeset/74920

Log:
operator traits: uniform handling of warning removal
Text files modified:
   trunk/boost/type_traits/detail/has_binary_operator.hpp | 4 ++--
   trunk/boost/type_traits/detail/has_postfix_operator.hpp | 9 ++++++---
   trunk/boost/type_traits/detail/has_prefix_operator.hpp | 4 ++--
   3 files changed, 10 insertions(+), 7 deletions(-)

Modified: trunk/boost/type_traits/detail/has_binary_operator.hpp
==============================================================================
--- trunk/boost/type_traits/detail/has_binary_operator.hpp (original)
+++ trunk/boost/type_traits/detail/has_binary_operator.hpp 2011-10-11 16:38:20 EDT (Tue, 11 Oct 2011)
@@ -38,7 +38,7 @@
 // cannot find another implementation -> declared as system header to suppress these warnings.
 #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
 # pragma GCC system_header
-#elif BOOST_MSVC
+#elif defined(BOOST_MSVC)
 # pragma warning ( push )
 # pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 )
 #endif
@@ -222,7 +222,7 @@
 
 } // namespace boost
 
-#ifdef BOOST_MSVC
+#if defined(BOOST_MSVC)
 # pragma warning ( pop )
 #endif
 

Modified: trunk/boost/type_traits/detail/has_postfix_operator.hpp
==============================================================================
--- trunk/boost/type_traits/detail/has_postfix_operator.hpp (original)
+++ trunk/boost/type_traits/detail/has_postfix_operator.hpp 2011-10-11 16:38:20 EDT (Tue, 11 Oct 2011)
@@ -21,9 +21,12 @@
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
 
-#if defined(BOOST_MSVC)
+// avoid warnings
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+# pragma GCC system_header
+#elif defined(BOOST_MSVC)
 # pragma warning ( push )
-# pragma warning ( disable : 4913 4244 )
+# pragma warning ( disable : 4244 4913 )
 #endif
 
 namespace boost {
@@ -194,7 +197,7 @@
 } // namespace boost
 
 #if defined(BOOST_MSVC)
-# pragma warning (pop)
+# pragma warning ( pop )
 #endif
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>

Modified: trunk/boost/type_traits/detail/has_prefix_operator.hpp
==============================================================================
--- trunk/boost/type_traits/detail/has_prefix_operator.hpp (original)
+++ trunk/boost/type_traits/detail/has_prefix_operator.hpp 2011-10-11 16:38:20 EDT (Tue, 11 Oct 2011)
@@ -32,7 +32,7 @@
 // cannot find another implementation -> declared as system header to suppress these warnings.
 #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
 # pragma GCC system_header
-#elif BOOST_MSVC
+#elif defined(BOOST_MSVC)
 # pragma warning ( push )
 # pragma warning ( disable : 4146 4804 4913 4244 )
 #endif
@@ -203,7 +203,7 @@
 
 } // namespace boost
 
-#ifdef BOOST_MSVC
+#if defined(BOOST_MSVC)
 # pragma warning ( pop )
 #endif
 


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