summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-11 18:19:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-11 19:20:07 (GMT)
commit857e44c156a1dbefcb49bb5792c4384cebd8762a (patch)
tree11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/boost/integer
parent77d4eb7588e113beaa03f3347523b26adefdeb06 (diff)
downloadswift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip
swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/boost/integer')
-rw-r--r--3rdParty/Boost/src/boost/integer/static_log2.hpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/3rdParty/Boost/src/boost/integer/static_log2.hpp b/3rdParty/Boost/src/boost/integer/static_log2.hpp
index 19e048b..56c7a00 100644
--- a/3rdParty/Boost/src/boost/integer/static_log2.hpp
+++ b/3rdParty/Boost/src/boost/integer/static_log2.hpp
@@ -16,7 +16,7 @@
#ifndef BOOST_INTEGER_STATIC_LOG2_HPP
#define BOOST_INTEGER_STATIC_LOG2_HPP
-#include "boost/config.hpp" // for BOOST_STATIC_CONSTANT
+#include "boost/integer_fwd.hpp" // for boost::intmax_t
namespace boost {
@@ -41,14 +41,13 @@ namespace boost {
// terminates with x = 1 and n = 0 (see the algorithm's
// invariant).
- typedef unsigned long argument_type;
- typedef int result_type;
-
+ typedef boost::static_log2_argument_type argument_type;
+ typedef boost::static_log2_result_type result_type;
template <result_type n>
struct choose_initial_n {
- enum { c = (argument_type(1) << n << n) != 0 };
+ BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0);
BOOST_STATIC_CONSTANT(
result_type,
value = !c*n + choose_initial_n<2*c*n>::value
@@ -85,7 +84,7 @@ namespace boost {
template <argument_type x, result_type n = initial_n>
struct static_log2_impl {
- enum { c = (x >> n) > 0 }; // x >= 2**n ?
+ BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ?
BOOST_STATIC_CONSTANT(
result_type,
value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value)
@@ -107,10 +106,6 @@ namespace boost {
// static_log2<x>
// ----------------------------------------
- typedef detail::static_log2_impl::argument_type static_log2_argument_type;
- typedef detail::static_log2_impl::result_type static_log2_result_type;
-
-
template <static_log2_argument_type x>
struct static_log2 {