|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62941 - sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-06-14 14:19:57
Author: bbartman
Date: 2010-06-14 14:19:56 EDT (Mon, 14 Jun 2010)
New Revision: 62941
URL: http://svn.boost.org/trac/boost/changeset/62941
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 | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 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:19:56 EDT (Mon, 14 Jun 2010)
@@ -11,6 +11,7 @@
#include <boost/integer/bits_mask.hpp>
#include <boost/cstdint.hpp>
#include <boost/type_traits.hpp>
+#include <boost/mpl/not.hpp>
// std includes.
#include <cstddef>
@@ -106,8 +107,13 @@
Encoded_Type,
Width,
Return_Type,
- is_signed<Encoded_Type>::value &&
- bit_width<Return_Type>::value != Width
+ is_signed< Encoded_Type >::value
+ &&
+ bit_width< Encoded_Type >::value != Width
+ &&
+ mpl::not_< is_same< Encoded_Type, bool > >::value
+ &&
+ Width != 1
>()(x);
}
@@ -118,8 +124,13 @@
Decoding_Type,
Width,
Return_Type,
- is_signed<Return_Type>::value &&
- bit_width<Return_Type>::value != Width
+ is_signed< Return_Type >::value
+ &&
+ bit_width< Return_Type >::value != Width
+ &&
+ mpl::not_< is_same< Return_Type, bool > >::value
+ &&
+ Width != 1
>()( x );
}
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