Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63960 - in sandbox/SOC/2010/bit_masks/boost: bitfield integer
From: bbartmanboost_at_[hidden]
Date: 2010-07-13 09:08:33


Author: bbartman
Date: 2010-07-13 09:08:30 EDT (Tue, 13 Jul 2010)
New Revision: 63960
URL: http://svn.boost.org/trac/boost/changeset/63960

Log:
working on suppressing warnings from MSVC 9
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/bitfield/bitfield.hpp | 15 ++++++++++++---
   sandbox/SOC/2010/bit_masks/boost/integer/low_bits_mask.hpp | 2 --
   2 files changed, 12 insertions(+), 5 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/bitfield/bitfield.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/bitfield/bitfield.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/bitfield/bitfield.hpp 2010-07-13 09:08:30 EDT (Tue, 13 Jul 2010)
@@ -12,6 +12,11 @@
 
 #ifndef BOOST_INTEGER_BITFIELD__HPP
 #define BOOST_INTEGER_BITFIELD__HPP
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 3512 )
+#endif
 
 #include <cstddef>
 #include <boost/static_assert.hpp>
@@ -85,9 +90,9 @@
         struct bitfield_complete_signed<true, value_type, storage_type, WIDTH, SIGN_MASK> {
             static value_type convert(storage_type val) {
                 if( (val>>(WIDTH-1))!=0) {
- return (val | SIGN_MASK);
+ return static_cast<value_type>(val | SIGN_MASK);
                 } else {
- return val;
+ return static_cast<value_type>(val);
                 }
             }
         };
@@ -95,7 +100,7 @@
         template <typename value_type, typename storage_type, unsigned int WIDTH, unsigned int SIGN_MASK>
         struct bitfield_complete_signed<false, value_type, storage_type, WIDTH, SIGN_MASK> {
             static value_type convert(storage_type val) {
- return val;
+ return static_cast<value_type>(val);
             }
         };
     }
@@ -395,5 +400,9 @@
     typename bitfield<STORAGE_TYPE,F,L,VALUE_TYPE,REFERENCE_TYPE>::storage_type(~bitfield<STORAGE_TYPE,F,L,VALUE_TYPE,REFERENCE_TYPE>::VAL_MASK);
 */
 }}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
 #endif
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/low_bits_mask.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/low_bits_mask.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/low_bits_mask.hpp 2010-07-13 09:08:30 EDT (Tue, 13 Jul 2010)
@@ -7,8 +7,6 @@
 
 #ifndef BOOST_LOW_BITS_MASK_HPP
 #define BOOST_LOW_BITS_MASK_HPP
-
-// #include <boost/type_traits.hpp>
 #include <boost/integer/detail/high_low_impl.hpp>
 #include <boost/integer/integral_mask.hpp>
 #include <boost/type_traits/integral_constant.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