$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r62939 - sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-06-14 14:15:03
Author: bbartman
Date: 2010-06-14 14:15:02 EDT (Mon, 14 Jun 2010)
New Revision: 62939
URL: http://svn.boost.org/trac/boost/changeset/62939
Log:
working on fixing some of the logic within the arbitrary twos complement
Text files modified: 
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/twos_complement_testing.cpp |    42 +-------------------------------------- 
   1 files changed, 2 insertions(+), 40 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/twos_complement_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/twos_complement_testing.cpp	(original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/twos_complement_testing.cpp	2010-06-14 14:15:02 EDT (Mon, 14 Jun 2010)
@@ -106,7 +106,8 @@
         Encoded_Type,
         Width,
         Return_Type,
-        is_signed<Encoded_Type>::value
+        is_signed<Encoded_Type>::value &&
+            bit_width<Return_Type>::value != Width
     >()(x);
 }
 
@@ -207,38 +208,6 @@
     // getting value bits
     Return_Type eval_6 = static_cast<Return_Type>(storage & low_bits_mask<Decoding_From_Type,Width-1>::value );
     BOOST_ASSERT(( eval_6 == bits_mask<Return_Type,1,2>::value));
-
-
-
-    /*
-    // Attempting to reconstruct the value
-    // Return_Type eval_7 =
-        // sign bit.
-    Return_Type sign_bit = static_cast<Return_Type>(
-        high_bits_mask<
-            Return_Type,
-            bit_width<
-                Return_Type
-            >::value - Width
-        >::value
-    );
-
-    // Value Bits.
-    Return_Type value_bits =
-        static_cast<Return_Type>(
-            storage
-              &
-            bits_mask<
-                Decoding_From_Type,
-                Width - 1
-            >::value
-        )
-          <<
-        (bit_width<Return_Type>::value - Width);
-
-    // if(
-    */
-
     }
     {
         std::size_t storage = 0;
@@ -249,13 +218,6 @@
         temp = twos_complement_decoding< unsigned int, 4, char >( storage );
         cout << "Value of Temp == "<< (int)temp <<endl;
         BOOST_ASSERT((temp == -2));
-
-        cout << static_cast<int>(temp) << endl;
-        cout << bits_mask<int,1,2>::value << endl;
-        int temp_2 (0);
-        temp_2 = ~temp_2;
-        temp_2 << 1;
-        cout << temp_2 << endl;
     }
     return 0;
 }