|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63489 - sandbox/SOC/2010/bits_and_ints/boost/integer
From: muriloufg_at_[hidden]
Date: 2010-07-02 14:54:17
Author: murilov
Date: 2010-07-01 13:24:10 EDT (Thu, 01 Jul 2010)
New Revision: 63489
URL: http://svn.boost.org/trac/boost/changeset/63489
Log:
Now static_bit_reversal is implemented in terms of mpl::bit_reversal
Text files modified:
sandbox/SOC/2010/bits_and_ints/boost/integer/static_bit_reversal.hpp | 29 ++++++++++-------------------
1 files changed, 10 insertions(+), 19 deletions(-)
Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_bit_reversal.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_bit_reversal.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_bit_reversal.hpp 2010-07-01 13:24:10 EDT (Thu, 01 Jul 2010)
@@ -25,36 +25,27 @@
namespace boost
{
-
-// If T is an integral type, static_bit_reversal<T, data>::value will
-// be `data' with the bits reversed
-template <typename T, T data, class Enable = typename enable_if< is_integral<T> >::type>
-struct static_bit_reversal : mpl::integral_c<T,
- integer_detail::static_bit_reversal_impl<
- T,
- data,
- sizeof(T) * 8
- >::value
->
-{}; // struct static_bit_reversal<>
namespace mpl {
/*
* Boost MPL compatible metafunctions
*/
-
+
template <typename IC>
-struct bit_reversal : integral_c<typename IC::value_type,
- integer_detail::static_bit_reversal_impl<
- typename IC::value_type,
- IC::value, sizeof(typename IC::value_type) * 8
- >::value
+struct bit_reversal : integer_detail::static_bit_reversal_impl<
+ typename IC::value_type,
+ IC::value, sizeof(typename IC::value_type) * 8
>
{}; // struct bit_reversal
-
} // namespace mpl
+
+// If T is an integral type, static_bit_reversal<T, data>::value will
+// be `data' with the bits reversed
+template <typename T, T data, class Enable = typename enable_if< is_integral<T> >::type>
+struct static_bit_reversal : mpl::bit_reversal< mpl::integral_c<T, data> >
+{}; // struct static_bit_reversal<>
} // namespace boost
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