Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63982 - sandbox/SOC/2010/bit_masks/boost/integer
From: bbartmanboost_at_[hidden]
Date: 2010-07-13 14:36:00


Author: bbartman
Date: 2010-07-13 14:35:59 EDT (Tue, 13 Jul 2010)
New Revision: 63982
URL: http://svn.boost.org/trac/boost/changeset/63982

Log:
attempting a different type of fix for msvc. introduced additional warnings in the process fixing them, again
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/high_bits_mask.hpp | 17 +++++------------
   1 files changed, 5 insertions(+), 12 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/high_bits_mask.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/high_bits_mask.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/high_bits_mask.hpp 2010-07-13 14:35:59 EDT (Tue, 13 Jul 2010)
@@ -7,11 +7,6 @@
 
 #ifndef BOOST_HIGH_BITS_MASK_HPP
 #define BOOST_HIGH_BITS_MASK_HPP
-
-
-
-
-
 #include <boost/config.hpp>
 #include <boost/mpl/bitwise.hpp>
 #include <boost/mpl/size_t.hpp>
@@ -19,7 +14,7 @@
 #include <boost/integer/integral_mask.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/type_traits/make_unsigned.hpp>
-
+#include <limits>
 
 
 
@@ -37,12 +32,10 @@
     template<typename T, unsigned int Width>
     struct evaluate_for_msvc_08 {
         typedef typename make_unsigned<T>::type unsigned_type;
- BOOST_STATIC_CONSTANT(unsigned_type, val = static_cast<unsigned_type>(
- ~(mpl::shift_right<
- mpl::size_t<~( T(0) )>,
- mpl::size_t<Width>
- >::type::value)
- )
+ BOOST_STATIC_CONSTANT(unsigned_type, val = std::numeric_limits<unsigned_type>::value & (~(mpl::shift_right<
+ mpl::size_t<~( T(0) )>,
+ mpl::size_t<Width>
+ >::type::value)
         ));
         typedef integral_constant<T, val> type;
     };


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