|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63856 - in sandbox/SOC/2010/bits_and_ints: boost/integer libs/integer/test
From: muriloufg_at_[hidden]
Date: 2010-07-11 08:44:05
Author: murilov
Date: 2010-07-11 08:44:05 EDT (Sun, 11 Jul 2010)
New Revision: 63856
URL: http://svn.boost.org/trac/boost/changeset/63856
Log:
Fixed bit_reversal() enable_if<>
Text files modified:
sandbox/SOC/2010/bits_and_ints/boost/integer/bit_reversal.hpp | 3 ++-
sandbox/SOC/2010/bits_and_ints/libs/integer/test/sign_extend_test.cpp | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/bit_reversal.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/bit_reversal.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/bit_reversal.hpp 2010-07-11 08:44:05 EDT (Sun, 11 Jul 2010)
@@ -25,7 +25,8 @@
*/
template <typename T>
-inline typename enable_if_c<is_integral<T>::type::value, T>::type
+inline typename enable_if_c<is_integral<T>::value
+ && (sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8), T>::type
bit_reversal(T data)
{
Modified: sandbox/SOC/2010/bits_and_ints/libs/integer/test/sign_extend_test.cpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/libs/integer/test/sign_extend_test.cpp (original)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/test/sign_extend_test.cpp 2010-07-11 08:44:05 EDT (Sun, 11 Jul 2010)
@@ -60,8 +60,8 @@
#ifndef BOOST_NO_INT64_T
SIGN_EXTEND_TEST(0x7FFFFFFFFFLL, 39, -0x1LL);
- //SIGN_EXTEND_TEST(0x100000000000LL, 63, 0x100000000000LL);
- //SIGN_EXTEND_TEST(0x7FFFFFFFFFFFFFFFLL, 63, -0x1LL);
+ SIGN_EXTEND_TEST(0x100000000000LL, 63, 0x100000000000LL);
+ SIGN_EXTEND_TEST(0x7FFFFFFFFFFFFFFFLL, 63, -0x1LL);
#endif
return boost::report_errors();
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