Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63881 - in sandbox/SOC/2010/bits_and_ints: boost/integer libs/integer/doc libs/integer/doc/html libs/integer/doc/html/boost_integer
From: muriloufg_at_[hidden]
Date: 2010-07-11 13:26:36


Author: murilov
Date: 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
New Revision: 63881
URL: http://svn.boost.org/trac/boost/changeset/63881

Log:
Improving documentation
Added pragma to avoid a warning in MSVC compilers
Some cosmetic changes
Text files modified:
   sandbox/SOC/2010/bits_and_ints/boost/integer/round_power_2.hpp | 27
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_abs.hpp | 8
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_clear_least_bit_set.hpp | 4
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp | 2
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign.hpp | 4
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign_extend.hpp | 4
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/bits_and_ints.qbk | 276 ++++++++++++++++--
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html | 587 ++++++++++++++++++++++++++++++++++-----
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html | 4
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/index.html | 2
   10 files changed, 783 insertions(+), 135 deletions(-)

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/round_power_2.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/round_power_2.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/round_power_2.hpp 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -12,21 +12,20 @@
 #define BOOST_POWER_2_ROUND
 
 /*
- * The functions declared in this file an integra rounds up or down to
- * the next power of 2.
+ * The functions declared in this file rounds up or down an integral to the next power of 2.
  *
- * The functions `ceil_to_power_2()' rounds up and the functions
- * `floor_to_power_2()' rounds down.
+ * The functions `ceil_pow2()' rounds up and the functions
+ * `floor_pow2()' rounds down.
  *
  * Usage:
  *
- * T x = ceil_to_power_2(y); // rounds down
- * T z = floor_to_power_2(w); // rounds up
+ * T x = ceil_pow2(y); // rounds down
+ * T z = floor_pow2(w); // rounds up
  */
 
 namespace boost {
         
-uint8_t ceil_to_power_2(uint8_t value)
+uint8_t ceil_pow2(uint8_t value)
 {
         value = value - 1;
         value = value | (value >> 1);
@@ -36,7 +35,7 @@
         return value + 1;
 }
 
-uint16_t ceil_to_power_2(uint16_t value)
+uint16_t ceil_pow2(uint16_t value)
 {
         value = value - 1;
         value = value | (value >> 1);
@@ -47,7 +46,7 @@
         return value + 1;
 }
         
-uint32_t ceil_to_power_2(uint32_t value)
+uint32_t ceil_pow2(uint32_t value)
 {
         value = value - 1;
         value = value | (value >> 1);
@@ -60,7 +59,7 @@
 }
 
 #ifndef BOOST_HAS_INT64_T
-uint64_t ceil_to_power_2(uint64_t value)
+uint64_t ceil_pow2(uint64_t value)
 {
         value = value - 1;
         value = value | (value >> 1);
@@ -74,7 +73,7 @@
 }
 #endif
         
-uint8_t floor_to_power_2(uint8_t value)
+uint8_t floor_pow2(uint8_t value)
 {
         value = value | (value >> 1);
         value = value | (value >> 2);
@@ -83,7 +82,7 @@
         return value - (value >> 1);
 }
         
-uint16_t floor_to_power_2(uint16_t value)
+uint16_t floor_pow2(uint16_t value)
 {
         value = value | (value >> 1);
         value = value | (value >> 2);
@@ -93,7 +92,7 @@
         return value - (value >> 1);
 }
         
-uint32_t floor_to_power_2(uint32_t value)
+uint32_t floor_pow2(uint32_t value)
 {
         value = value | (value >> 1);
         value = value | (value >> 2);
@@ -105,7 +104,7 @@
 }
 
 #ifndef BOOST_HAS_INT64_T
-uint64_t floor_to_power_2(uint64_t value)
+uint64_t floor_pow2(uint64_t value)
 {
         value = value | (value >> 1);
         value = value | (value >> 2);

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_abs.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_abs.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_abs.hpp 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -22,8 +22,8 @@
 
 /*
  * This header defines mpl::abs<> and static_abs<> metafunctions.
- * The mpl::abs<> version returns the absolute value of an mpl::integral_c<>
- * and the static_abs version returns the absolute value from an integral value.
+ * The mpl::abs<> version returns the absolute value of a mpl::integral_c<>
+ * and the static_abs<> version returns the absolute value from an integral value.
  */
 
 namespace mpl {
@@ -36,8 +36,8 @@
 
 }
 
-template <typename T, T data, class Enable = typename enable_if< is_integral<T> >::type >
-struct static_abs : mpl::abs< mpl::integral_c<T, data> >
+template <typename T, T Value, class Enable = typename enable_if< is_integral<T> >::type >
+struct static_abs : mpl::abs< mpl::integral_c<T, Value> >
 {};
 
 } // boost

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_clear_least_bit_set.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_clear_least_bit_set.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_clear_least_bit_set.hpp 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -46,8 +46,8 @@
 /*
  * Requires T to be an integral type
  */
-template <typename T, T value>
-struct static_clear_least_bit_set : mpl::clear_least_bit_set< mpl::integral_c<T, value> >
+template <typename T, T Value>
+struct static_clear_least_bit_set : mpl::clear_least_bit_set< mpl::integral_c<T, Value> >
 {};
 
 }

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -21,7 +21,7 @@
 
 /*
  * This header defines mpl::lcm<> metafunction wich calculates the
- * least common multiplier from two given mpl::integral_c<> ICT1 and ICT2.
+ * least common multiple from two given mpl::integral_c<> ICT1 and ICT2.
  */
         
 namespace mpl {

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign.hpp 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -42,12 +42,12 @@
 
 }
 
-template <typename T, T data
+template <typename T, T Value
     , class Enable = typename enable_if<
         is_integral<T>
>::type
>
-struct static_sign : mpl::sign<mpl::integral_c< T, data> >
+struct static_sign : mpl::sign<mpl::integral_c<T, Value> >
 {};
 
 } // boost

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign_extend.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign_extend.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign_extend.hpp 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -30,6 +30,10 @@
  * Wich is -6 in 32-bit 2-complement.
  */
 
+#ifdef BOOST_MSVC
+#pragma warning ( disable : 4307 )
+#endif
+
 namespace boost {
         
 namespace mpl {

Modified: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/bits_and_ints.qbk
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/libs/integer/doc/bits_and_ints.qbk (original)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/bits_and_ints.qbk 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -284,6 +284,26 @@
 
 [endsect]
 
+[section Static Functions `mpl::sign` and `static_sign`]
+The compile-time versions can be included via [@../../../../boost/integer/static_sign.hpp <boost/integer/static_sign.hpp>].
+
+ template <typename IC>
+ struct mpl::sign { static const int value = ``['implementation-defined]``; };
+
+ template <template T, T Value>
+ struct static_same_sign { static const int value = ``['implementation-defined]``; };
+
+[table
+ [[Parameter][Description]]
+ [[`IC`][ A `mpl::integral_c<>` type. ]]
+ [[`T`][ The value type. Must be an integral type. ]]
+ [[`Value`][ The value to be checked. ]]
+]
+
+*[*Requires: ] `T` to be an integral type and `IC` to be an `mpl::integral_c<>` type.
+
+[endsect]
+
 [section Examples]
 *[*Run-time version:]
 
@@ -368,10 +388,17 @@
 [section Synopsis]
 
         int pop_count(uintmax_t value);
+
+ template <uintmax_t Value>
+ struct static_pop_count { static const int value = ``['implementation-defined]``; };
+
+ template <typename IC>
+ struct pop_count { static const int value = ``['implementation-defined]``; };
 
 [endsect]
 
-[*Returns: ] The number of bits set in `value`.
+*[*Requires: ] `IC` must be an `mpl::integral_c<>` type.
+*[*Returns: ] The number of bits set in `value`. For the compile-time versions, the result will be on member `value`.
 
 [endsect]
 
@@ -380,27 +407,187 @@
 
 [section Synopsis]
 
+ template <typename T>
         T clear_least_bit_set(T value);
+
+ template <typename IC>
+ struct mpl::clear_least_bit_set { static const typename IC::value_type value = ``['implementation-defined]``; };
+
+ template <typename T, T Value>
+ struct static_clear_least_bit_set { static const T value = ``['implementation-defined]``; };
 
 [endsect]
 
-*[*Remarks: ] `T` must be an integral type.
+*[*Requires: ] `T` must be an integral type. `IC` must be an `mpl::integral_c<>` type.
 
 *[*Returns: ] `value` with it's least significant active bit disactivated.
 
 [endsect]
 
 [section Count Trailing Zeros]
-The `count_trailing_zeros()` function counts the number of consecutive 0's from the least significant bit of an integral value.
-This function is defined on [@../../../../boost/integer/count_trailing_zeros.hpp <boost/integer/count_trailing_zeros.hpp>]
+The `count_trailing_zeros` function and metafunctions counts the number of consecutive 0's from the least significant bit of an integral value.
+The runtime function is defined on [@../../../../boost/integer/count_trailing_zeros.hpp <boost/integer/count_trailing_zeros.hpp>] and
+the compile-time metafunctions are defined on [@../../../../boost/integer/static_count_trailing_zeros.hpp <boost/integer/static_count_trailing_zeros.hpp>]
 
 [section Synopsis]
         
         int count_trailing_zeros(uintmax_t value);
         
+ template <typename IC>
+ struct mpl::count_trailing_zeros { static const int value = ``['implementation-defined]``; };
+
+ template <uintmax_t Value>
+ struct static_count_trailing_zeros { static const int value = ``['implementation-defined]``; };
+
+[endsect]
+
+*[*Requires: ] For the `mpl::count_trailing_zeros<>` version, `IC` must be an mpl::integral_c<> type.
+*[*Returns: ] For the runtime version, the number of consecutive zeros from the least significant bit.
+In the compile-time versions, the number of consecutive zeros in the `value` static member.
+
+[endsect]
+
+[section Safe Average]
+Given two integer values x and y, the (floor of the) average normally would be computed by `(x+y)/2` unfortunately,
+this can yield incorrect results due to overflow. Safe average ensures that no overflow will happen even if `(x+y)`
+overflows the range of T.
+The runtime version is defined on [@../../../../boost/integer/safe_avg.hpp <boost/integer/safe_avg.hpp>] and
+the compile-time metafunctions are defined on [@../../../../boost/integer/static_safe_avg.hpp <boost/integer/static_safe_avg.hpp>]
+
+[section Synopsis]
+
+ template <typename T>
+ T safe_avg(T x, T y);
+
+ template <typename ICT1, typename ICT2>
+ struct mpl::safe_avg { static const int value = ``['implementation-defined]``; };
+
+ template <typename T, T Value1, T Value2>
+ struct static_safe_avg { static const int value = ``['implementation-defined]``; };
+
+[endsect]
+
+*[*Requires: ] For the `mpl::safe_avg<>` version, both `ICT1` and `ICT2` must be mpl::integral_c<> types.
+For the `static_safe_avg<>` and the runtime version, `T` must be an integral type.
+
+*[*Returns: ] The average of the sum between two integrals rounded down. Overflow is ensured to not happen.
+
+[endsect]
+
+[section Round to Power of 2 functions]
+This function rounds up and down integral values to the next power of 2.
+The `ceil_pow2` function rounds up and `floor_pow2` function rounds down.
+These functions are defined on [@../../../../boost/integer/round_power_2.hpp <boost/integer/round_power_2.hpp>]
+
+[section Synopsis]
+
+ T ceil_pow2(T value);
+ T floor_pow2(T value);
+
 [endsect]
 
-*[*Returns: ] The number of consecutive zeros from the least significant bit.
+*[*Requires: ] `T` must be convertible to `uint8_t` or `uint16_t` or `uint32_t` or `uint64_t`.
+
+*[*Returns: ]
+ * `ceil_pow2()` returns `value` rounded [*up] to the lesser power of two greater than or equal to `value.
+
+ * `floor_pow2()` returns `value` rounded [*down] to the greater power of two lesser or equal `value`.
+
+[endsect]
+
+[section Transfer of Sign (isign) functions ]
+isign or transfer of sign function is defined by:
+``
+ isign(x, y) =
+ abs(x), if y is greater than or equal 0,
+ -abs(x), if y is less than 0
+``
+
+The runtime functions are defined on [@../../../../boost/integer/isign.hpp <boost/integer/isign.hpp>] and the
+static metafunctions are defined on [@../../../../boost/integer/static_isign.hpp <boost/integer/static_isign.hpp>]
+
+[section Synopsis]
+
+ template <typename T>
+ T isign(T x, T y);
+
+ template <typename T, T Value1, T Value2>
+ struct static_isign { static const T value = ``['implementation-defined]``; };
+
+ template <typename IC1, typename IC2>
+ struct mpl::isign { static const typename IC1::value_type value = ``['implementation-defined]``; };
+
+[endsect]
+
+*[*Requires: ] `T` must be an integral type. Both `IC1` and `IC2` must be `mpl::integral_c<>` types.
+*[*Returns: ]
+ * Runtime version: returns `abs(x)` if `y` is greater than or equal 0 and `-abs(x)` if `y` is negative.
+
+ * MPL version: the member `value` will be `abs(IC1::value)` if `IC2` holds an value greater than or
+ equal 0, or `-abs(IC1::value)` if `IC2` holds a negative value.
+
+ * `static_isign<T, Value1, Value2>::value` will be `abs(Value1)` if Value2 is greater than or equal 0, or
+ `-abs(Value1)` if Value2 is negative.
+
+[endsect]
+
+[section Absolute Value in Compile-Time ]
+The static metafunctions defined on [@../../../../boost/integer/static_abs.hpp <boost/integer/static_abs.hpp>]
+calculates the absolute value of integral constants.
+
+`mpl::abs<>` version returns the absolute value of a `mpl::integral_c<>`
+and the `static_abs<>` version returns the absolute value from an integral value.
+
+[section Synopsis]
+
+ template <typename IC>
+ struct mpl::abs { static const typename IC::value_type value = ``['implementation-defined]``; };
+
+ template <typename T, T Value>
+ struct static_abs { static const T value = ``['implementation-defined]``; };
+
+[endsect]
+
+*[*Requires: ] `T` must be an integral type. `IC` a `mpl::integral_c<>` type.
+
+*[*Results: ] The member `value ` in `mpl::abs<>` will be the absolute value of `IC::value`.
+In `static_abs<>`, `value` will be the absolute value of `Value`.
+
+[endsect]
+
+[section MPL Least Common Multiple ]
+This header defines mpl::lcm<> metafunction wich calculates the
+ least common multiple from two given `mpl::integral_c<>`.
+
+This static metafunction is defined on [@../../../../boost/integer/static_lcm.hpp <boost/integer/static_lcm.hpp>].
+
+[section Synopsis]
+
+ template <typename ICT1, typename ICT2>
+ struct mpl::lcm { static const uintmax_t value = ``['implementation-defined]``; };
+
+[endsect]
+
+*[*Requires: ] `ICT1` and `ICT2` must be `mpl::integral_c<>` types.
+
+*[*Results: ] The member `value ` will be the least common multiple from `IC1` and `IC2`.
+
+[endsect]
+
+[section MPL Greatest Common Divisor ]
+The header file [@../../../../boost/integer/static_gcd.hpp <boost/integer/static_gcd.hpp>] defines `mpl::gcd<>`
+metafunction wich calculates the greatest common divisor of two given `mpl::integral_c<>`.
+
+[section Synopsis]
+
+ template <typename ICT1, typename ICT2>
+ struct mpl::gcd { static const uintmax_t value = ``['implementation-defined]``; };
+
+[endsect]
+
+*[*Requires: ] `ICT1` and `ICT2` must be `mpl::integral_c<>` types.
+
+*[*Results: ] The member `value ` will be the greatest commom divisor from `IC1` and `IC2`.
 
 [endsect]
 
@@ -415,43 +602,50 @@
                 
         // Sets the bit `pos' in data
         template <typename T, T data, unsigned char pos>
- struct set_bit
- {
- static const T value = ``['implementation-defined]``;
- }; // set_bit
+ struct static_set_bit { static const T value = ``['implementation-defined]``; };
                 
-
         // Clear the bit `pos' in data
         template <typename T, T data, unsigned char pos>
- struct clear_bit
- {
- static const T value = ``['implementation-defined]``;
- }; // clear_bit
+ struct static_clear_bit { static const T value = ``['implementation-defined]``; };
 
         // If the bit `pos' is 1 then it will be 0 if not the bit will be 1
         template <typename T, T data, unsigned char pos>
- struct flip_bit
- {
- static const T value = ``['implementation-defined]``;
- }; // flip_bit
+ struct static_flip_bit{ static const T value = ``['implementation-defined]``; };
 
         // Test if the bit in `pos' positon is set or not
         template <typename T, T data, unsigned char pos>
- struct test_bit
- {
- static const bool value = ``['implementation-defined]``;
- }; // test_bit
+ struct static_test_bit { static const bool value = ``['implementation-defined]``; };
+
+ namespace mpl {
+
+ template <typename IC, unsigned char pos>
+ struct set_bit { static const typename IC::value_type value = ``['implementation-defined]``; };
+
+ template <typename IC, unsigned char pos>
+ struct clear_bit { static const typename IC::value_type value = ``['implementation-defined]``; };
+
+ template <typename IC, unsigned char pos>
+ struct flip_bit{ static const typename IC::value_type value = ``['implementation-defined]``; };
+
+ template <typename IC, unsigned char pos>
+ struct test_bit { static const bool value = ``['implementation-defined]``; };
+
+ } // mpl
                 
         } // boost
 
 [endsect]
 
-[section Template Class `set_bit<>`]
-Sets the bit `pos` active in `data`.
+[section Template Class `static_set_bit<>` and `mpl::set_bit`]
+Sets the bit `pos` active in `value`.
 
-*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
+*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_set_bit<>` and smaller than IC::value_type
+ for `mpl::static_set_bit<>`.
+
+*[*Remarks: ]
+ * `T` must be an integral type. If this constraint is not met, `static_set_bit<>` do not participate in overload resolution.
         
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
+ * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::set_bit<>` metafunction do not participate in overload resolution.
 
 *[*Example:]
 
@@ -460,13 +654,17 @@
 
 [endsect]
         
-[section Template Class `clear_bit<>`]
+[section Template Class `mpl::clear_bit<>` and `static_clear_bit<>`]
 Sets the bit `pos` inactive in `data`.
 
 
-*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
+*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_clear_bit<>` and smaller than IC::value_type
+ for `mpl::static_clear_bit<>`.
         
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
+*[*Remarks: ]
+ * `T` must be an integral type. If this constraint is not met, `static_clear_bit<>` do not participate in overload resolution.
+
+ * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::clear_bit<>` metafunction do not participate in overload resolution.
 
 *[*Example:]
 
@@ -475,13 +673,17 @@
 
 [endsect]
 
-[section Template Class `test_bit<>`]
+[section Template Class `mpl::test_bit` and `static_test_bit<>`]
 Test if the bit `pos` in `data` is active or not.
 
 
-*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
+*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_test_bit<>` and smaller than IC::value_type
+ for `mpl::static_test_bit<>`.
+
+*[*Remarks: ]
+ * `T` must be an integral type. If this constraint is not met, `static_test_bit<>` do not participate in overload resolution.
         
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
+ * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::test_bit<>` metafunction do not participate in overload resolution.
 
 *[*Example:]
 
@@ -490,12 +692,16 @@
 
 [endsect]
 
-[section Template Class `flip_bit<>`]
+[section Template Class `mpl::flip_bit<>` and `static_flip_bit<>`]
 Invert the value of the bit `pos` in `data`
 
-*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
+*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_flip_bit<>` and smaller than IC::value_type
+ for `mpl::static_flip_bit<>`.
+
+*[*Remarks: ]
+ * `T` must be an integral type. If this constraint is not met, `static_flip_bit<>` do not participate in overload resolution.
         
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
+ * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::flip_bit<>` metafunction do not participate in overload resolution.
 
 *[*Example:]
 

Modified: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html (original)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -39,6 +39,17 @@
       Least Bit Set</a></span></dt>
 <dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.count_trailing_zeros">Count
       Trailing Zeros</a></span></dt>
+<dt><span class="section">Safe Average</span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions">Round
+ to Power of 2 functions</a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_">Transfer
+ of Sign (isign) functions </a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_">Absolute
+ Value in Compile-Time </a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_">MPL
+ Least Common Multiple </a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_">MPL
+ Greatest Common Divisor </a></span></dt>
 <dt><span class="section"> Binary Utilities</span></dt>
 </dl></div>
 <div class="section" title="Overview">
@@ -633,6 +644,8 @@
 <div class="toc"><dl>
 <dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign.non_member_function__sign_">Non-Member
         Function <code class="computeroutput"><span class="identifier">sign</span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign.static_functions__mpl__sign__and__static_sign_">Static
+ Functions <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign</span></code> and <code class="computeroutput"><span class="identifier">static_sign</span></code></a></span></dt>
 <dt><span class="section">Examples</span></dt>
 </dl></div>
 <p>
@@ -746,6 +759,84 @@
             do not participate in overload resolution.
           </li></ul></div>
 </div>
+<div class="section" title="Static Functions mpl::sign and static_sign">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.sign.static_functions__mpl__sign__and__static_sign_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.sign.static_functions__mpl__sign__and__static_sign_" title="Static Functions mpl::sign and static_sign">Static
+ Functions <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign</span></code> and <code class="computeroutput"><span class="identifier">static_sign</span></code></a>
+</h4></div></div></div>
+<p>
+ The compile-time versions can be included via <boost/integer/static_sign.hpp>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">template</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_same_sign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+</pre>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">IC</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The value type. Must be an integral type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Value</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The value to be checked.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ to be an integral type and <code class="computeroutput"><span class="identifier">IC</span></code>
+ to be an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type.
+ </li></ul></div>
+</div>
 <div class="section" title="Examples">
 <div class="titlepage"><div><div><h4 class="title">
 <a name="boost_integer.bits_and_ints.sign.examples"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.sign.examples" title="Examples">Examples</a>
@@ -876,11 +967,25 @@
 <a name="boost_integer.bits_and_ints.population_count__count_bits_set_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.population_count__count_bits_set_.synopsis" title="Synopsis">Synopsis</a>
 </h4></div></div></div>
 <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">pop_count</span><span class="special">(</span><span class="identifier">uintmax_t</span> <span class="identifier">value</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">uintmax_t</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_pop_count</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">pop_count</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
 </pre>
 </div>
-<p>
- <span class="bold"><strong>Returns: </strong></span> The number of bits set in <code class="computeroutput"><span class="identifier">value</span></code>.
- </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">IC</span></code>
+ must be an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Returns: </strong></span> The number of bits set in <code class="computeroutput"><span class="identifier">value</span></code>. For the compile-time versions,
+ the result will be on member <code class="computeroutput"><span class="identifier">value</span></code>.
+ </li>
+</ul></div>
 </div>
 <div class="section" title="Clear Least Bit Set">
 <div class="titlepage"><div><div><h3 class="title">
@@ -895,13 +1000,22 @@
 <div class="titlepage"><div><div><h4 class="title">
 <a name="boost_integer.bits_and_ints.clear_least_bit_set.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.clear_least_bit_set.synopsis" title="Synopsis">Synopsis</a>
 </h4></div></div></div>
-<pre class="programlisting"><span class="identifier">T</span> <span class="identifier">clear_least_bit_set</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">T</span> <span class="identifier">clear_least_bit_set</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_least_bit_set</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_clear_least_bit_set</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
 </pre>
 </div>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
- must be an integral type.
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ must be an integral type. <code class="computeroutput"><span class="identifier">IC</span></code>
+ must be an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type.
         </li>
 <li class="listitem">
 <span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="identifier">value</span></code>
@@ -916,21 +1030,293 @@
 </h3></div></div></div>
 <div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
 <p>
- The <code class="computeroutput"><span class="identifier">count_trailing_zeros</span><span class="special">()</span></code> function counts the number of consecutive
- 0's from the least significant bit of an integral value. This function is
- defined on <boost/integer/count_trailing_zeros.hpp>
+ The <code class="computeroutput"><span class="identifier">count_trailing_zeros</span></code>
+ function and metafunctions counts the number of consecutive 0's from the
+ least significant bit of an integral value. The runtime function is defined
+ on <boost/integer/count_trailing_zeros.hpp>
+ and the compile-time metafunctions are defined on <boost/integer/static_count_trailing_zeros.hpp>
       </p>
 <div class="section" title="Synopsis">
 <div class="titlepage"><div><div><h4 class="title">
 <a name="boost_integer.bits_and_ints.count_trailing_zeros.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.count_trailing_zeros.synopsis" title="Synopsis">Synopsis</a>
 </h4></div></div></div>
 <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">count_trailing_zeros</span><span class="special">(</span><span class="identifier">uintmax_t</span> <span class="identifier">value</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">count_trailing_zeros</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">uintmax_t</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_count_trailing_zeros</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
 </pre>
 </div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<span class="bold"><strong>Returns: </strong></span> The number of consecutive zeros
- from the least significant bit.
- </li></ul></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span> For the <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">count_trailing_zeros</span><span class="special">&lt;&gt;</span></code> version, <code class="computeroutput"><span class="identifier">IC</span></code>
+ must be an mpl::integral_c&lt;&gt; type.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Returns: </strong></span> For the runtime version, the
+ number of consecutive zeros from the least significant bit. In the compile-time
+ versions, the number of consecutive zeros in the <code class="computeroutput"><span class="identifier">value</span></code>
+ static member.
+ </li>
+</ul></div>
+</div>
+<div class="section" title="Safe Average">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.bits_and_ints.safe_average"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.safe_average" title="Safe Average">Safe Average</a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
+<p>
+ Given two integer values x and y, the (floor of the) average normally would
+ be computed by <code class="computeroutput"><span class="special">(</span><span class="identifier">x</span><span class="special">+</span><span class="identifier">y</span><span class="special">)/</span><span class="number">2</span></code> unfortunately, this can yield incorrect results
+ due to overflow. Safe average ensures that no overflow will happen even if
+ <code class="computeroutput"><span class="special">(</span><span class="identifier">x</span><span class="special">+</span><span class="identifier">y</span><span class="special">)</span></code>
+ overflows the range of T. The runtime version is defined on <boost/integer/safe_avg.hpp>
+ and the compile-time metafunctions are defined on <boost/integer/static_safe_avg.hpp>
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.safe_average.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.safe_average.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">T</span> <span class="identifier">safe_avg</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ICT1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ICT2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">safe_avg</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_safe_avg</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+</pre>
+</div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span> For the <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">safe_avg</span><span class="special">&lt;&gt;</span></code> version, both <code class="computeroutput"><span class="identifier">ICT1</span></code>
+ and <code class="computeroutput"><span class="identifier">ICT2</span></code> must be mpl::integral_c&lt;&gt;
+ types. For the <code class="computeroutput"><span class="identifier">static_safe_avg</span><span class="special">&lt;&gt;</span></code> and the runtime version, <code class="computeroutput"><span class="identifier">T</span></code> must be an integral type.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Returns: </strong></span> The average of the sum between
+ two integrals rounded down. Overflow is ensured to not happen.
+ </li>
+</ul></div>
+</div>
+<div class="section" title="Round to Power of 2 functions">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.bits_and_ints.round_to_power_of_2_functions"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions" title="Round to Power of 2 functions">Round
+ to Power of 2 functions</a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
+<p>
+ This function rounds up and down integral values to the next power of 2.
+ The <code class="computeroutput"><span class="identifier">ceil_pow2</span></code> function rounds
+ up and <code class="computeroutput"><span class="identifier">floor_pow2</span></code> function
+ rounds down. These functions are defined on <boost/integer/round_power_2.hpp>
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.round_to_power_of_2_functions.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="identifier">T</span> <span class="identifier">ceil_pow2</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
+<span class="identifier">T</span> <span class="identifier">floor_pow2</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
+</pre>
+</div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ must be convertible to <code class="computeroutput"><span class="identifier">uint8_t</span></code>
+ or <code class="computeroutput"><span class="identifier">uint16_t</span></code> or <code class="computeroutput"><span class="identifier">uint32_t</span></code> or <code class="computeroutput"><span class="identifier">uint64_t</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Returns: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ceil_pow2</span><span class="special">()</span></code>
+ returns <code class="computeroutput"><span class="identifier">value</span></code> rounded
+ <span class="bold"><strong>up</strong></span> to the lesser power of two greater
+ than or equal to `value.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">floor_pow2</span><span class="special">()</span></code>
+ returns <code class="computeroutput"><span class="identifier">value</span></code> rounded
+ <span class="bold"><strong>down</strong></span> to the greater power of two lesser
+ or equal <code class="computeroutput"><span class="identifier">value</span></code>.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+<div class="section" title="Transfer of Sign (isign) functions">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.bits_and_ints.transfer_of_sign__isign__functions_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_" title="Transfer of Sign (isign) functions">Transfer
+ of Sign (isign) functions </a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
+<p>
+ isign or transfer of sign function is defined by:
+</p>
+<pre class="programlisting"><span class="identifier">isign</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">=</span>
+ <span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span> <span class="keyword">if</span> <span class="identifier">y</span> <span class="identifier">is</span> <span class="identifier">greater</span> <span class="identifier">than</span> <span class="keyword">or</span> <span class="identifier">equal</span> <span class="number">0</span><span class="special">,</span>
+<span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span> <span class="keyword">if</span> <span class="identifier">y</span> <span class="identifier">is</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">0</span>
+</pre>
+<p>
+ </p>
+<p>
+ The runtime functions are defined on <boost/integer/isign.hpp>
+ and the static metafunctions are defined on <boost/integer/static_isign.hpp>
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.transfer_of_sign__isign__functions_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">T</span> <span class="identifier">isign</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_isign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IC2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">isign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC1</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+</pre>
+</div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ must be an integral type. Both <code class="computeroutput"><span class="identifier">IC1</span></code>
+ and <code class="computeroutput"><span class="identifier">IC2</span></code> must be <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ types.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Returns: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Runtime version: returns <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> if <code class="computeroutput"><span class="identifier">y</span></code>
+ is greater than or equal 0 and <code class="computeroutput"><span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ if <code class="computeroutput"><span class="identifier">y</span></code> is negative.
+ </li>
+<li class="listitem">
+ MPL version: the member <code class="computeroutput"><span class="identifier">value</span></code>
+ will be <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">IC1</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span></code>
+ if <code class="computeroutput"><span class="identifier">IC2</span></code> holds an value
+ greater than or equal 0, or <code class="computeroutput"><span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">IC1</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span></code>
+ if <code class="computeroutput"><span class="identifier">IC2</span></code> holds a negative
+ value.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">static_isign</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">Value1</span><span class="special">,</span>
+ <span class="identifier">Value2</span><span class="special">&gt;::</span><span class="identifier">value</span></code> will be <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">Value1</span><span class="special">)</span></code> if Value2 is greater than or equal
+ 0, or <code class="computeroutput"><span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">Value1</span><span class="special">)</span></code> if Value2 is negative.
+ </li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+<div class="section" title="Absolute Value in Compile-Time">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.bits_and_ints.absolute_value_in_compile_time_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_" title="Absolute Value in Compile-Time">Absolute
+ Value in Compile-Time </a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
+<p>
+ The static metafunctions defined on <boost/integer/static_abs.hpp>
+ calculates the absolute value of integral constants.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">abs</span><span class="special">&lt;&gt;</span></code>
+ version returns the absolute value of a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code> and the <code class="computeroutput"><span class="identifier">static_abs</span><span class="special">&lt;&gt;</span></code> version returns the absolute value
+ from an integral value.
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.absolute_value_in_compile_time_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">abs</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_abs</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+</pre>
+</div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ must be an integral type. <code class="computeroutput"><span class="identifier">IC</span></code>
+ a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Results: </strong></span> The member <code class="computeroutput"><span class="identifier">value</span>
+ </code> in <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">abs</span><span class="special">&lt;&gt;</span></code>
+ will be the absolute value of <code class="computeroutput"><span class="identifier">IC</span><span class="special">::</span><span class="identifier">value</span></code>.
+ In <code class="computeroutput"><span class="identifier">static_abs</span><span class="special">&lt;&gt;</span></code>,
+ <code class="computeroutput"><span class="identifier">value</span></code> will be the absolute
+ value of <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ul></div>
+</div>
+<div class="section" title="MPL Least Common Multiple">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.bits_and_ints.mpl_least_common_multiple_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_" title="MPL Least Common Multiple">MPL
+ Least Common Multiple </a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
+<p>
+ This header defines mpl::lcm&lt;&gt; metafunction wich calculates the least
+ common multiple from two given <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>.
+ </p>
+<p>
+ This static metafunction is defined on <boost/integer/static_lcm.hpp>.
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.mpl_least_common_multiple_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ICT1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ICT2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">lcm</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">uintmax_t</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+</pre>
+</div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">ICT1</span></code>
+ and <code class="computeroutput"><span class="identifier">ICT2</span></code> must be <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ types.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Results: </strong></span> The member <code class="computeroutput"><span class="identifier">value</span>
+ </code> will be the least common multiple from <code class="computeroutput"><span class="identifier">IC1</span></code>
+ and <code class="computeroutput"><span class="identifier">IC2</span></code>.
+ </li>
+</ul></div>
+</div>
+<div class="section" title="MPL Greatest Common Divisor">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.bits_and_ints.mpl_greatest_common_divisor_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_" title="MPL Greatest Common Divisor">MPL
+ Greatest Common Divisor </a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">Synopsis</span></dt></dl></div>
+<p>
+ The header file <boost/integer/static_gcd.hpp>
+ defines <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">gcd</span><span class="special">&lt;&gt;</span></code>
+ metafunction wich calculates the greatest common divisor of two given <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>.
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.mpl_greatest_common_divisor_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ICT1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ICT2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">gcd</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">uintmax_t</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+</pre>
+</div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">ICT1</span></code>
+ and <code class="computeroutput"><span class="identifier">ICT2</span></code> must be <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ types.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Results: </strong></span> The member <code class="computeroutput"><span class="identifier">value</span>
+ </code> will be the greatest commom divisor from <code class="computeroutput"><span class="identifier">IC1</span></code>
+ and <code class="computeroutput"><span class="identifier">IC2</span></code>.
+ </li>
+</ul></div>
 </div>
 <div class="section" title="Binary Utilities">
 <div class="titlepage"><div><div><h3 class="title">
@@ -938,14 +1324,17 @@
 </h3></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section">Synopsis</span></dt>
-<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__set_bit___">Template
- Class <code class="computeroutput"><span class="identifier">set_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
-<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__clear_bit___">Template
- Class <code class="computeroutput"><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
-<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__test_bit___">Template
- Class <code class="computeroutput"><span class="identifier">test_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
-<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__flip_bit___">Template
- Class <code class="computeroutput"><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__static_set_bit____and__mpl__set_bit_">Template
+ Class <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>
+ and <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">set_bit</span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__clear_bit____and__static_clear_bit___">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code>
+ and <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__test_bit__and__static_test_bit___">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">test_bit</span></code> and <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__flip_bit____and__static_flip_bit___">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code>
+ and <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
 </dl></div>
 <p>
         The header <boost/integer/bin_utils.hpp>
@@ -962,65 +1351,81 @@
         
 <span class="comment">// Sets the bit `pos' in data
 </span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">set_bit</span>
-<span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
-<span class="special">};</span> <span class="comment">// set_bit
-</span>
-
+<span class="keyword">struct</span> <span class="identifier">static_set_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
 <span class="comment">// Clear the bit `pos' in data
 </span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">clear_bit</span>
-<span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
-<span class="special">};</span> <span class="comment">// clear_bit
-</span>
+<span class="keyword">struct</span> <span class="identifier">static_clear_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
 <span class="comment">// If the bit `pos' is 1 then it will be 0 if not the bit will be 1
 </span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">flip_bit</span>
-<span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
-<span class="special">};</span> <span class="comment">// flip_bit
-</span>
+<span class="keyword">struct</span> <span class="identifier">static_flip_bit</span><span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
 <span class="comment">// Test if the bit in `pos' positon is set or not
 </span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">test_bit</span>
-<span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
-<span class="special">};</span> <span class="comment">// test_bit
+<span class="keyword">struct</span> <span class="identifier">static_test_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">namespace</span> <span class="identifier">mpl</span> <span class="special">{</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">set_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">clear_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">flip_bit</span><span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">test_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// mpl
 </span>
 <span class="special">}</span> <span class="comment">// boost
 </span></pre>
 </div>
-<div class="section" title="Template Class set_bit&lt;&gt;">
+<div class="section" title="Template Class static_set_bit&lt;&gt; and mpl::set_bit">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost_integer.bits_and_ints.bin_utils.template_class__set_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__set_bit___" title="Template Class set_bit&lt;&gt;">Template
- Class <code class="computeroutput"><span class="identifier">set_bit</span><span class="special">&lt;&gt;</span></code></a>
+<a name="boost_integer.bits_and_ints.bin_utils.template_class__static_set_bit____and__mpl__set_bit_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__static_set_bit____and__mpl__set_bit_" title="Template Class static_set_bit&lt;&gt; and mpl::set_bit">Template
+ Class <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>
+ and <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">set_bit</span></code></a>
 </h4></div></div></div>
 <p>
           Sets the bit <code class="computeroutput"><span class="identifier">pos</span></code> active
- in <code class="computeroutput"><span class="identifier">data</span></code>.
+ in <code class="computeroutput"><span class="identifier">value</span></code>.
         </p>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
 <span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
- must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
+ must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
+ for <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>
+ and smaller than IC::value_type for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>.
           </li>
 <li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
- must be an integral type. If this constraint is not met, this metafunction
- do not participate in overload resolution.
- </li>
+<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
+ resolution.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">set_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
+ in overload resolution.
+ </li>
+</ul></div>
+</li>
 <li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
 </ul></div>
 <pre class="programlisting"><span class="comment">// `new_value' becomes 101
 </span><span class="keyword">int</span> <span class="identifier">new_value</span> <span class="special">=</span> <span class="identifier">set_bit</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="number">100</span><span class="special">,</span> <span class="number">0</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span>
 </pre>
 </div>
-<div class="section" title="Template Class clear_bit&lt;&gt;">
+<div class="section" title="Template Class mpl::clear_bit&lt;&gt; and static_clear_bit&lt;&gt;">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost_integer.bits_and_ints.bin_utils.template_class__clear_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__clear_bit___" title="Template Class clear_bit&lt;&gt;">Template
- Class <code class="computeroutput"><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code></a>
+<a name="boost_integer.bits_and_ints.bin_utils.template_class__mpl__clear_bit____and__static_clear_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__clear_bit____and__static_clear_bit___" title="Template Class mpl::clear_bit&lt;&gt; and static_clear_bit&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code>
+ and <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code></a>
 </h4></div></div></div>
 <p>
           Sets the bit <code class="computeroutput"><span class="identifier">pos</span></code> inactive
@@ -1029,23 +1434,34 @@
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
 <span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
- must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
+ must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
+ for <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code> and smaller than IC::value_type
+ for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code>.
           </li>
 <li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
- must be an integral type. If this constraint is not met, this metafunction
- do not participate in overload resolution.
- </li>
+<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
+ resolution.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
+ in overload resolution.
+ </li>
+</ul></div>
+</li>
 <li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
 </ul></div>
 <pre class="programlisting"><span class="comment">// `new_value' becomes 1
 </span><span class="keyword">int</span> <span class="identifier">new_value</span> <span class="special">=</span> <span class="identifier">set_bit</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="number">3</span><span class="special">,</span> <span class="number">2</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span>
 </pre>
 </div>
-<div class="section" title="Template Class test_bit&lt;&gt;">
+<div class="section" title="Template Class mpl::test_bit and static_test_bit&lt;&gt;">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost_integer.bits_and_ints.bin_utils.template_class__test_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__test_bit___" title="Template Class test_bit&lt;&gt;">Template
- Class <code class="computeroutput"><span class="identifier">test_bit</span><span class="special">&lt;&gt;</span></code></a>
+<a name="boost_integer.bits_and_ints.bin_utils.template_class__mpl__test_bit__and__static_test_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__test_bit__and__static_test_bit___" title="Template Class mpl::test_bit and static_test_bit&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">test_bit</span></code> and <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code></a>
 </h4></div></div></div>
 <p>
           Test if the bit <code class="computeroutput"><span class="identifier">pos</span></code> in
@@ -1054,23 +1470,35 @@
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
 <span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
- must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
+ must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
+ for <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code>
+ and smaller than IC::value_type for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code>.
           </li>
 <li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
- must be an integral type. If this constraint is not met, this metafunction
- do not participate in overload resolution.
- </li>
+<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
+ resolution.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">test_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
+ in overload resolution.
+ </li>
+</ul></div>
+</li>
 <li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
 </ul></div>
 <pre class="programlisting"><span class="comment">// `is_set' becomes true
 </span><span class="keyword">bool</span> <span class="identifier">is_set</span> <span class="special">=</span> <span class="identifier">test_bit</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="number">3982</span><span class="special">,</span> <span class="number">11</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span>
 </pre>
 </div>
-<div class="section" title="Template Class flip_bit&lt;&gt;">
+<div class="section" title="Template Class mpl::flip_bit&lt;&gt; and static_flip_bit&lt;&gt;">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost_integer.bits_and_ints.bin_utils.template_class__flip_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__flip_bit___" title="Template Class flip_bit&lt;&gt;">Template
- Class <code class="computeroutput"><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code></a>
+<a name="boost_integer.bits_and_ints.bin_utils.template_class__mpl__flip_bit____and__static_flip_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__flip_bit____and__static_flip_bit___" title="Template Class mpl::flip_bit&lt;&gt; and static_flip_bit&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code>
+ and <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code></a>
 </h4></div></div></div>
 <p>
           Invert the value of the bit <code class="computeroutput"><span class="identifier">pos</span></code>
@@ -1079,13 +1507,24 @@
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
 <span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
- must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
+ must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
+ for <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code>
+ and smaller than IC::value_type for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code>.
           </li>
 <li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
- must be an integral type. If this constraint is not met, this metafunction
- do not participate in overload resolution.
- </li>
+<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
+ resolution.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
+ type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
+ in overload resolution.
+ </li>
+</ul></div>
+</li>
 <li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
 </ul></div>
 <pre class="programlisting"><span class="comment">// `new_value' becomes 14

Modified: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html (original)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -26,7 +26,7 @@
 <a name="boost_integer.history"></a><a class="link" href="history.html" title="History"> History</a>
 </h2></div></div></div>
 <a name="boost_integer.history.1_42_0"></a><h5>
-<a name="id560880"></a>
+<a name="id36200325"></a>
       <a class="link" href="history.html#boost_integer.history.1_42_0">1.42.0</a>
     </h5>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
@@ -55,7 +55,7 @@
       </li>
 </ul></div>
 <a name="boost_integer.history.1_32_0"></a><h5>
-<a name="id560998"></a>
+<a name="id36200445"></a>
       <a class="link" href="history.html#boost_integer.history.1_32_0">1.32.0</a>
     </h5>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">

Modified: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/index.html
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/index.html (original)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/index.html 2010-07-11 13:26:34 EDT (Sun, 11 Jul 2010)
@@ -255,7 +255,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: June 21, 2010 at 20:43:18 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 11, 2010 at 17:24:10 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>


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