$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r62065 - sandbox/SOC/2010/bit_masks/boost/integer
From: bbartmanboost_at_[hidden]
Date: 2010-05-17 09:10:33
Author: bbartman
Date: 2010-05-17 09:10:33 EDT (Mon, 17 May 2010)
New Revision: 62065
URL: http://svn.boost.org/trac/boost/changeset/62065
Log:
added the ~ operator to mask types for runtime support
Text files modified: 
   sandbox/SOC/2010/bit_masks/boost/integer/bit_mask.hpp      |     4 ++++                                    
   sandbox/SOC/2010/bit_masks/boost/integer/high_low_bits.hpp |     9 +++++++++                               
   sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp |     5 +++++                                   
   3 files changed, 18 insertions(+), 0 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/boost/integer/bit_mask.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bit_mask.hpp	(original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bit_mask.hpp	2010-05-17 09:10:33 EDT (Mon, 17 May 2010)
@@ -86,6 +86,10 @@
     return bit_mask<T,Offset,Width>::value ^ t;
 }
 
+template <typename T, unsigned int Offset, unsigned int Width>
+inline T operator~(bit_mask<T,Offset,Width>) {
+    return ~( bit_mask<T,Offset,Width>::value );
+}
 
 } // namespace boost
 
Modified: sandbox/SOC/2010/bit_masks/boost/integer/high_low_bits.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/high_low_bits.hpp	(original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/high_low_bits.hpp	2010-05-17 09:10:33 EDT (Mon, 17 May 2010)
@@ -78,6 +78,11 @@
     return low_bits<T,Width>::value ^ t;
 }
 
+template <typename T, unsigned int Width>
+inline T operator~(low_bits<T,Width>) {
+    return ~( low_bits<T,Width>::value );
+}
+
 
 // high_bits runtime support functions.
 // Overloads for bitwise and
@@ -113,6 +118,10 @@
     return high_bits<T,Width>::value ^ t;
 }
 
+template <typename T, unsigned int Width>
+inline T operator~(high_bits<T,Width>) {
+    return ~( high_bits<T,Width>::value );
+}
 
 } // namespace boost 
 
Modified: sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp	(original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp	2010-05-17 09:10:33 EDT (Mon, 17 May 2010)
@@ -74,6 +74,11 @@
     return integral_mask<T,Value>::value ^ t;
 }
 
+template <typename T, unsigned int Width>
+inline T operator~(integral_mask<T,Width>) {
+    return ~( integral_mask<T,Width>::value );
+}
+
 } // namespace boost