Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-05-27 19:56:15


Author: turkanis
Date: 2008-05-27 19:56:14 EDT (Tue, 27 May 2008)
New Revision: 45843
URL: http://svn.boost.org/trac/boost/changeset/45843

Log:
moved code suppressing VC warning 6334 into disable_warnings.hpp
Text files modified:
   trunk/boost/iostreams/detail/config/disable_warnings.hpp | 1 +
   trunk/boost/iostreams/detail/is_iterator_range.hpp | 14 +++++---------
   trunk/boost/iostreams/traits.hpp | 14 +++++---------
   3 files changed, 11 insertions(+), 18 deletions(-)

Modified: trunk/boost/iostreams/detail/config/disable_warnings.hpp
==============================================================================
--- trunk/boost/iostreams/detail/config/disable_warnings.hpp (original)
+++ trunk/boost/iostreams/detail/config/disable_warnings.hpp 2008-05-27 19:56:14 EDT (Tue, 27 May 2008)
@@ -16,6 +16,7 @@
 # pragma warning(disable:4244) // Conversion: possible loss of data.
 # pragma warning(disable:4512) // Assignment operator could not be generated.
 # pragma warning(disable:4706) // Assignment within conditional expression.
+# pragma warning(disable:6334) // sizeof applied to an expression with an operator.
 #else
 # if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
 # pragma warn -8008 // Condition always true/false.

Modified: trunk/boost/iostreams/detail/is_iterator_range.hpp
==============================================================================
--- trunk/boost/iostreams/detail/is_iterator_range.hpp (original)
+++ trunk/boost/iostreams/detail/is_iterator_range.hpp 2008-05-27 19:56:14 EDT (Tue, 27 May 2008)
@@ -12,6 +12,9 @@
 #include <boost/detail/workaround.hpp>
 #include <boost/iostreams/detail/bool_trait_def.hpp>
 
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp>
+
 namespace boost {
 
 # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
@@ -22,17 +25,8 @@
     
 namespace iostreams {
 
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(push)
-# pragma warning(disable:6334)
-#endif
-
 BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_iterator_range, boost::iterator_range, 1)
 
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(pop)
-#endif
-
 } // End namespace iostreams.
 
 # else // # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //-----------------------//
@@ -50,4 +44,6 @@
 
 } // End namespace boost.
 
+#include <boost/iostreams/detail/config/enable_warnings.hpp>
+
 #endif // #ifndef BOOST_IOSTREAMS_DETAIL_IS_ITERATOR_RANGE_HPP_INCLUDED

Modified: trunk/boost/iostreams/traits.hpp
==============================================================================
--- trunk/boost/iostreams/traits.hpp (original)
+++ trunk/boost/iostreams/traits.hpp 2008-05-27 19:56:14 EDT (Tue, 27 May 2008)
@@ -42,15 +42,13 @@
 #include <boost/ref.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp>
+
 namespace boost { namespace iostreams {
 
 //----------Definitions of predicates for streams and stream buffers----------//
 
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(push)
-# pragma warning(disable:6334)
-#endif
-
 #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------//
 
 BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_istream, std::basic_istream, 2)
@@ -75,10 +73,6 @@
 
 #endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //----------------------//
 
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(pop)
-#endif
-
 template<typename T>
 struct is_std_io
     : mpl::or_< is_istream<T>, is_ostream<T>, is_streambuf<T> >
@@ -392,4 +386,6 @@
 
 } } // End namespaces iostreams, boost.
 
+#include <boost/iostreams/detail/config/enable_warnings.hpp>
+
 #endif // #ifndef BOOST_IOSTREAMS_IO_TRAITS_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