|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63969 - 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-13 13:30:33
Author: murilov
Date: 2010-07-13 13:30:32 EDT (Tue, 13 Jul 2010)
New Revision: 63969
URL: http://svn.boost.org/trac/boost/changeset/63969
Log:
Documentation updated.
Text files modified:
sandbox/SOC/2010/bits_and_ints/boost/integer/bit_utils.hpp | 36 +++-
sandbox/SOC/2010/bits_and_ints/boost/integer/sign_extend.hpp | 13
sandbox/SOC/2010/bits_and_ints/boost/integer/static_same_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 | 134 +++++++++++++-----
sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html | 289 +++++++++++++++++++++++++++++++--------
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
8 files changed, 361 insertions(+), 125 deletions(-)
Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/bit_utils.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/bit_utils.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/bit_utils.hpp 2010-07-13 13:30:32 EDT (Tue, 13 Jul 2010)
@@ -10,9 +10,9 @@
#ifndef BOOST_BIT_UTILS_INCLUDED
#define BOOST_BIT_UTILS_INCLUDED
-#include <boost/mpl/integral_c.hpp>
+#include <boost/static_assert.hpp>
#include <boost/mpl/bool.hpp>
-
+#include <boost/mpl/integral_c.hpp>
/*
* Some utilities to handle integers.
*/
@@ -56,45 +56,61 @@
struct set_bit : mpl::integral_c<typename IC::value_type,
(IC::value | (typename IC::value_type(1) << pos))
>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(typename IC::value_type) * 8));
+};
template <typename IC, unsigned char pos>
struct clear_bit : mpl::integral_c<typename IC::value_type,
(IC::value & ~(typename IC::value_type(1) << pos))
>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(typename IC::value_type) * 8));
+};
template <typename IC, unsigned char pos>
struct flip_bit : mpl::integral_c<typename IC::value_type,
(IC::value ^ (typename IC::value_type(1) << pos))
>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(typename IC::value_type) * 8));
+};
template <typename IC, unsigned char pos>
struct test_bit : mpl::bool_<((IC::value >> pos) & (typename IC::value_type)(1))>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(typename IC::value_type) * 8));
+};
} // mpl
// Sets the bit `pos' in data
template <typename T, T data, unsigned char pos>
struct static_set_bit : mpl::set_bit<mpl::integral_c<T, data>, pos>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(T) * 8));
+};
// Clear the bit `pos' in data
template <typename T, T data, unsigned char pos>
struct static_clear_bit : mpl::clear_bit<mpl::integral_c<T, data>, pos>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(T) * 8));
+};
// 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 static_flip_bit : mpl::flip_bit<mpl::integral_c<T, data>, pos>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(T) * 8));
+};
// Test if the bit in `pos' positon is set or not
template <typename T, T data, unsigned char pos>
struct static_test_bit : mpl::test_bit<mpl::integral_c<T, data>, pos>
-{};
+{
+ BOOST_STATIC_ASSERT((pos < sizeof(T) * 8));
+};
} // boost
Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/sign_extend.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/sign_extend.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/sign_extend.hpp 2010-07-13 13:30:32 EDT (Tue, 13 Jul 2010)
@@ -10,19 +10,20 @@
#ifndef BOOST_SIGN_EXTEND_INCLUDED
#define BOOST_SIGN_EXTEND_INCLUDED
+#include <boost/assert.hpp>
#include <boost/type_traits/is_integral.hpp>
-#include <boost/utility/enable_if.hpp>
namespace boost {
// Extend data represented in `bits' bits to
// sizeof(Type) * 8 bits
-template <typename Type>
-inline typename enable_if<is_integral<Type>, Type>::type
-sign_extend(Type data, std::size_t bits)
+template <typename T>
+T sign_extend(T data, std::size_t bits)
{
- data = data & ((Type(1) << bits) - 1);
- Type const mask = (Type(1) << (bits - 1));
+ BOOST_ASSERT((bits < sizeof(T) * 8));
+
+ data = data & ((T(1) << bits) - 1);
+ T const mask = (T(1) << (bits - 1));
return (data ^ mask) - mask;
}
Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_same_sign.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_same_sign.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_same_sign.hpp 2010-07-13 13:30:32 EDT (Tue, 13 Jul 2010)
@@ -51,8 +51,8 @@
* - false: if the signs of FIRST and SECOND are different
* - true: if the signs are equal
*/
-template <typename T, T first, T second>
-struct static_same_sign : mpl::same_sign< mpl::integral_c<T, first>, mpl::integral_c<T, second> >
+template <typename T, T Value1, T Value2>
+struct static_same_sign : mpl::same_sign< mpl::integral_c<T, Value1>, mpl::integral_c<T, Value2> >
{
BOOST_STATIC_ASSERT((is_integral<T>::value));
};
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-13 13:30:32 EDT (Tue, 13 Jul 2010)
@@ -58,8 +58,8 @@
}
// Compile-time version of sign_extend
-template<typename T, T data, std::size_t Bits>
-struct static_sign_extend : mpl::sign_extend<mpl::integral_c<T, data>, Bits>
+template<typename T, T Value, std::size_t Bits>
+struct static_sign_extend : mpl::sign_extend<mpl::integral_c<T, Value>, Bits>
{
BOOST_STATIC_ASSERT((is_integral<T>::value));
BOOST_STATIC_ASSERT((Bits > 0 && Bits < (sizeof(T) * 8)));
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-13 13:30:32 EDT (Tue, 13 Jul 2010)
@@ -15,13 +15,11 @@
[section Non-Member Function Template `sign_extend`]
The run-time version can be included via [@../../../../boost/integer/sign_extend.hpp <boost/integer/sign_extend.hpp>].
- template <typename Type>
- Type sign_extend(Type data, std::size_t bits);
+ template <typename T>
+ Type sign_extend(T data, std::size_t bits);
+
+*[*Requires: ] `bits` must be smaller than the size, in bits, of `T` and `T` must be an integral type.
-*[*Requires: ] `bits` must be smaller than the size (in bits) of `Type`.
-
-*[*Remarks: ] `Type` must be an integral type. If this constraint is not met, this function do not participate in overload resolution.
-
*[*Parameters:]
[table
@@ -30,9 +28,7 @@
[[`bits`][ The amount of bits in wich data is represented. ]]
]
-*[*Returns: ] `data` sign-extended to `sizeof(Type)` bytes.
-
-*[*Throws:] none.
+*[*Returns: ] `data` sign-extended to `sizeof(T)` bytes.
[endsect]
@@ -40,25 +36,46 @@
The compile-time version can be included via [@../../../../boost/integer/static_sign_extend.hpp <boost/integer/static_sign_extend.hpp>].
The result will be in `value` member.
- template<typename Type, Type data, std::size_t Bits>
+ template<typename T, T Value, std::size_t Bits>
struct static_sign_extend
{
- static const Type value = ``['implementation-defined]``;
+ static const T value = ``['implementation-defined]``;
};
-*[*Requires: ] `Bits` must be smaller than the size, in bits, of `Type`.
+*[*Requires: ] `Bits` must be smaller than the size, in bits, of `T` and `T` must be an integral type.
+
+*[*Template Parameters:]
+
+[table
+ [[Parameter][Description]]
+ [[`T`][ The data type. ]]
+ [[`Value`][ The data to be extended. ]]
+ [[`Bits`][ The amount of bits in wich data is represented. ]]
+]
+[endsect]
+
+[section Template Class `mpl::sign_extend<>`]
+The MPL version can be included via [@../../../../boost/integer/static_sign_extend.hpp <boost/integer/static_sign_extend.hpp>].
+The result will be in `value` member.
+
+ template<typename IC, std::size_t Bits>
+ struct mpl::sign_extend
+ {
+ static const T value = ``['implementation-defined]``;
+ };
-*[*Remarks: ] `Type` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
+
+*[*Requires: ] `IC` must a `mpl::integral_c<>` type. `Bits` must be smaller than the size in bits of `IC::value_type`.
*[*Template Parameters:]
[table
[[Parameter][Description]]
- [[`Type`][ The data type. ]]
- [[`data`][ The data to be extended. ]]
+ [[`IC`][ A `mpl::integral_c<>` type. ]]
[[`Bits`][ The amount of bits in wich data is represented. ]]
]
+
[endsect]
[section Examples]
@@ -112,7 +129,7 @@
[[`data`][ The data to be reversed. The type of data *must* be an integral type and it's size *must* be 8, 16, 32 or 64-bits, otherwise, bit_reversal(data) will result in an error. ]]
]
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this function do not participate in overload resolution.
+*[*Requires: ] `T` must be an integral type.
*[*Returns: ] `data` with its bits reversed.
@@ -122,7 +139,7 @@
The compile-time version can be included via [@../../../../boost/integer/static_bit_reversal.hpp <boost/integer/static_bit_reversal.hpp>].
The result will be in `value` member.
- template <typename T, T data>
+ template <typename T, T Value>
struct static_bit_reversal {
static const T value = ``['implementation-defined]``;
};
@@ -132,11 +149,32 @@
[table
[[Parameter][Description]]
[[`T`][ The data type. ]]
- [[`data`][ The data to be reversed. ]]
+ [[`Value`][ The data to be reversed. ]]
]
+
+*[*Requires: ] `T` must be an integral type.
+
[endsect]
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
+[section Template Class `mpl::bit_reversal<>`]
+The MPL version can be included via [@../../../../boost/integer/static_bit_reversal.hpp <boost/integer/static_bit_reversal.hpp>].
+The result will be in `value` member.
+
+ template <typename IC>
+ struct mpl::bit_reversal {
+ static const T value = ``['implementation-defined]``;
+ };
+
+*[*Template Parameters]
+
+[table
+ [[Parameter][Description]]
+ [[`IC`][ A `mpl::integral_c<>` type wich holds an integral constant to be reversed. ]]
+]
+
+*[*Requires: ] `IC` must be an `mpl::integral_c<>` type.
+
+[endsect]
[section Examples]
*[*Run-time version]
@@ -193,15 +231,15 @@
*[*Returns: ] `false` if the signs of first and second are different or `true` if the signs are equal
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this function do not participate in overload resolution.
+*[*Remarks: ] `T` must be an integral type.
[endsect]
[section Template Class `static_same_sign<>`]
-The compile-time version can be included via [@../../../../boost/integer/same_sign.hpp <boost/integer/same_sign.hpp>].
+The compile-time version can be included via [@../../../../boost/integer/static_same_sign.hpp <boost/integer/static_same_sign.hpp>].
The result will be in `value` member.
- template <typename T, T first, T second>
+ template <typename T, T Value1, T Value2>
struct static_same_sign
{
static const bool value = ``['implementation-defined]``;
@@ -212,10 +250,31 @@
[table
[[Parameter][Description]]
[[`T`][ The data type. ]]
- [[`first`, `second`][ The two integral values to be compared. ]]
+ [[`Value1`, `Value2`][ The two integral values to be compared. ]]
+]
+
+*[*Requires: ] `T` must be an integral type.
+
+[endsect]
+
+[section Template Class `mpl::same_sign<>`]
+The MPL version can be included via [@../../../../boost/integer/static_same_sign.hpp <boost/integer/static_same_sign.hpp>].
+The result will be in `value` member.
+
+ template <typename IC1, typename IC2>
+ struct mpl::same_sign
+ {
+ static const bool value = ``['implementation-defined]``;
+ };
+
+*[*Template Parameters:]
+
+[table
+ [[Parameter][Description]]
+ [[`IC1`, `IC2`][ The two `mpl::integral_c<>` to be compared. ]]
]
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this class do not participate in overload resolution.
+*[*Requires: ] `IC1` and `IC2` must be `mpl::integral_c<>` types.
[endsect]
@@ -280,7 +339,7 @@
[[`1`][ `data` is positive. ]]
]
-*[*Remarks: ] `T` must be an integral type. If this constraint is not met, this function do not participate in overload resolution.
+*[*Requires: ] `T` must be an integral type.
[endsect]
@@ -344,12 +403,12 @@
[endsect]
-*[*Remarks: ] `T1` and `T2` must be integral types. Additionally, `T1` must have 8, 16 or 32 bits and `T2` must have
+*[*Requires: ] `T1` and `T2` must be integral types. Additionally, `T1` must have 8, 16 or 32 bits and `T2` must have
16, 32 or 64 bits. For these functions `T2` have the double of bits wich `T1` have.
[*Returns: ] `interleave` function returns `x` and `y` interleaved. `x` will be in the even bits and `y` will be on odd positions, so the return type have the double of bits than the paramter's type.
-`uninterleave` returns an pair where in the member `first` will be the integral represented in the even positions of `number` and in the `second`
+`uninterleave` returns an `std::pair<>` where in the member `first` will be the integral represented in the even positions of `number` and in the `second`
member will be the integral represented in the odd positions of `number`.
[section Examples]
@@ -694,9 +753,9 @@
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.
+ * `T` must be an integral type.
- * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::set_bit<>` metafunction do not participate in overload resolution.
+ * `IC` must be a `mpl::integral_c<>` type.
*[*Example:]
@@ -713,10 +772,10 @@
for `mpl::static_clear_bit<>`.
*[*Remarks: ]
- * `T` must be an integral type. If this constraint is not met, `static_clear_bit<>` do not participate in overload resolution.
+ * `T` must be an integral type.
+
+ * `IC` must be a `mpl::integral_c<>` type.
- * `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:]
// `new_value' becomes 1
@@ -732,10 +791,10 @@
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.
+ * `T` must be an integral type.
+
+ * `IC` must be a `mpl::integral_c<>` type.
- * `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:]
// `is_set' becomes true
@@ -750,9 +809,9 @@
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.
+ * `T` must be an integral type.
- * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::flip_bit<>` metafunction do not participate in overload resolution.
+ * `IC` must be a `mpl::integral_c<>` type.
*[*Example:]
@@ -766,7 +825,6 @@
For all runtime functions, all remarks and requirement are equals to the `static_`-prefixed version.
[endsect]
-
[endsect]
[endsect]
\ No newline at end of file
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-13 13:30:32 EDT (Tue, 13 Jul 2010)
@@ -75,6 +75,8 @@
Function Template <code class="computeroutput"><span class="identifier">sign_extend</span></code></a></span></dt>
<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign_extend.template_class__static_sign_extend___">Template
Class <code class="computeroutput"><span class="identifier">static_sign_extend</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign_extend.template_class__mpl__sign_extend___">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign_extend</span><span class="special"><></span></code></a></span></dt>
<dt><span class="section">Examples</span></dt>
</dl></div>
<p>
@@ -96,18 +98,15 @@
<p>
The run-time version can be included via <boost/integer/sign_extend.hpp>.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Type</span><span class="special">></span>
-<span class="identifier">Type</span> <span class="identifier">sign_extend</span><span class="special">(</span><span class="identifier">Type</span> <span class="identifier">data</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">bits</span><span class="special">);</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<span class="identifier">Type</span> <span class="identifier">sign_extend</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">bits</span><span class="special">);</span>
</pre>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">bits</span></code>
- must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
- </li>
-<li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">Type</span></code>
- must be an integral type. If this constraint is not met, this function
- do not participate in overload resolution.
+ must be smaller than the size, in bits, of <code class="computeroutput"><span class="identifier">T</span></code>
+ and <code class="computeroutput"><span class="identifier">T</span></code> must be an integral
+ type.
</li>
<li class="listitem"><span class="bold"><strong>Parameters:</strong></span></li>
</ul></div>
@@ -155,15 +154,10 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<span class="bold"><strong>Returns: </strong></span><code class="computeroutput"><span class="identifier">data</span></code>
- sign-extended to <code class="computeroutput"><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">Type</span><span class="special">)</span></code> bytes.
- </li>
-<li class="listitem">
-<span class="bold"><strong>Throws:</strong></span> none.
- </li>
-</ul></div>
+ sign-extended to <code class="computeroutput"><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code> bytes.
+ </li></ul></div>
</div>
<div class="section" title="Template Class static_sign_extend<>">
<div class="titlepage"><div><div><h4 class="title">
@@ -175,21 +169,18 @@
The result will be in <code class="computeroutput"><span class="identifier">value</span></code>
member.
</p>
-<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Type</span><span class="special">,</span> <span class="identifier">Type</span> <span class="identifier">data</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Bits</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span><span class="special"><</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">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Bits</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">static_sign_extend</span>
<span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">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="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 class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">Bits</span></code>
- must be smaller than the size, in bits, of <code class="computeroutput"><span class="identifier">Type</span></code>.
- </li>
-<li class="listitem">
-<span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">Type</span></code>
- must be an integral type. If this constraint is not met, this metafunction
- do not participate in overload resolution.
+ must be smaller than the size, in bits, of <code class="computeroutput"><span class="identifier">T</span></code>
+ and <code class="computeroutput"><span class="identifier">T</span></code> must be an integral
+ type.
</li>
<li class="listitem"><span class="bold"><strong>Template Parameters:</strong></span></li>
</ul></div>
@@ -214,7 +205,7 @@
<tr>
<td>
<p>
- <code class="computeroutput"><span class="identifier">Type</span></code>
+ <code class="computeroutput"><span class="identifier">T</span></code>
</p>
</td>
<td>
@@ -226,7 +217,7 @@
<tr>
<td>
<p>
- <code class="computeroutput"><span class="identifier">data</span></code>
+ <code class="computeroutput"><span class="identifier">Value</span></code>
</p>
</td>
<td>
@@ -250,6 +241,77 @@
</tbody>
</table></div>
</div>
+<div class="section" title="Template Class mpl::sign_extend<>">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.sign_extend.template_class__mpl__sign_extend___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.sign_extend.template_class__mpl__sign_extend___" title="Template Class mpl::sign_extend<>">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign_extend</span><span class="special"><></span></code></a>
+</h4></div></div></div>
+<p>
+ The MPL version can be included via <boost/integer/static_sign_extend.hpp>.
+ The result will be in <code class="computeroutput"><span class="identifier">value</span></code>
+ member.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Bits</span><span class="special">></span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign_extend</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 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 a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special"><></span></code>
+ type. <code class="computeroutput"><span class="identifier">Bits</span></code> must be smaller
+ than the size in bits of <code class="computeroutput"><span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span></code>.
+ </li>
+<li class="listitem"><span class="bold"><strong>Template Parameters:</strong></span></li>
+</ul></div>
+<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"><></span></code>
+ type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Bits</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The amount of bits in wich data is represented.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
<div class="section" title="Examples">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_integer.bits_and_ints.sign_extend.examples"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.sign_extend.examples" title="Examples">Examples</a>
@@ -295,6 +357,8 @@
Function <code class="computeroutput"><span class="identifier">bit_reversal</span></code></a></span></dt>
<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bit_reversal.template_class__static_bit_reversal___">Template
Class <code class="computeroutput"><span class="identifier">static_bit_reversal</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bit_reversal.template_class__mpl__bit_reversal___">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bit_reversal</span><span class="special"><></span></code></a></span></dt>
<dt><span class="section">Examples</span></dt>
</dl></div>
<p>
@@ -347,9 +411,8 @@
</table></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. If this constraint is not met, this function
- do not participate in overload resolution.
+<span class="bold"><strong>Requires: </strong></span><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><code class="computeroutput"><span class="identifier">data</span></code>
@@ -367,7 +430,7 @@
The result will be in <code class="computeroutput"><span class="identifier">value</span></code>
member.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
<span class="keyword">struct</span> <span class="identifier">static_bit_reversal</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>
@@ -406,7 +469,7 @@
<tr>
<td>
<p>
- <code class="computeroutput"><span class="identifier">data</span></code>
+ <code class="computeroutput"><span class="identifier">Value</span></code>
</p>
</td>
<td>
@@ -417,12 +480,64 @@
</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>
+ must be an integral type.
+ </li></ul></div>
</div>
+<div class="section" title="Template Class mpl::bit_reversal<>">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.bit_reversal.template_class__mpl__bit_reversal___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bit_reversal.template_class__mpl__bit_reversal___" title="Template Class mpl::bit_reversal<>">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bit_reversal</span><span class="special"><></span></code></a>
+</h4></div></div></div>
+<p>
+ The MPL version can be included via <boost/integer/static_bit_reversal.hpp>.
+ The result will be in <code class="computeroutput"><span class="identifier">value</span></code>
+ member.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">></span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bit_reversal</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 class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="bold"><strong>Template Parameters</strong></span></li></ul></div>
+<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"><></span></code>
+ type wich holds an integral constant to be reversed.
+ </p>
+ </td>
+</tr></tbody>
+</table></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. If this constraint is not met, this metafunction
- do not participate in overload resolution.
- </li></ul></div>
+<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"><></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.bit_reversal.examples"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bit_reversal.examples" title="Examples">Examples</a>
@@ -470,6 +585,8 @@
Function <code class="computeroutput"><span class="identifier">same_sign</span></code></a></span></dt>
<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.same_sign.template_class__static_same_sign___">Template
Class <code class="computeroutput"><span class="identifier">static_same_sign</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.same_sign.template_class__mpl__same_sign___">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">same_sign</span><span class="special"><></span></code></a></span></dt>
<dt><span class="section">Examples</span></dt>
</dl></div>
<p>
@@ -528,8 +645,7 @@
</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 function
- do not participate in overload resolution.
+ must be an integral type.
</li>
</ul></div>
</div>
@@ -539,11 +655,11 @@
Class <code class="computeroutput"><span class="identifier">static_same_sign</span><span class="special"><></span></code></a>
</h4></div></div></div>
<p>
- The compile-time version can be included via <boost/integer/same_sign.hpp>.
+ The compile-time version can be included via <boost/integer/static_same_sign.hpp>.
The result will be in <code class="computeroutput"><span class="identifier">value</span></code>
member.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">second</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></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">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
@@ -583,7 +699,7 @@
<tr>
<td>
<p>
- <code class="computeroutput"><span class="identifier">first</span></code>, <code class="computeroutput"><span class="identifier">second</span></code>
+ <code class="computeroutput"><span class="identifier">Value1</span></code>, <code class="computeroutput"><span class="identifier">Value2</span></code>
</p>
</td>
<td>
@@ -595,9 +711,62 @@
</tbody>
</table></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. If this constraint is not met, this class do
- not participate in overload resolution.
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ must be an integral type.
+ </li></ul></div>
+</div>
+<div class="section" title="Template Class mpl::same_sign<>">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_integer.bits_and_ints.same_sign.template_class__mpl__same_sign___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.same_sign.template_class__mpl__same_sign___" title="Template Class mpl::same_sign<>">Template
+ Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">same_sign</span><span class="special"><></span></code></a>
+</h4></div></div></div>
+<p>
+ The MPL version can be included via <boost/integer/static_same_sign.hpp>.
+ The result will be in <code class="computeroutput"><span class="identifier">value</span></code>
+ member.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
+<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">same_sign</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>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="bold"><strong>Template Parameters:</strong></span></li></ul></div>
+<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">IC1</span></code>, <code class="computeroutput"><span class="identifier">IC2</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The two <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special"><></span></code>
+ to be compared.
+ </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">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"><></span></code>
+ types.
</li></ul></div>
</div>
<div class="section" title="Examples">
@@ -759,9 +928,8 @@
</tbody>
</table></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. If this constraint is not met, this function
- do not participate in overload resolution.
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
+ must be an integral type.
</li></ul></div>
</div>
<div class="section" title="Static Functions mpl::sign and static_sign">
@@ -901,7 +1069,7 @@
</p>
</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">T1</span></code>
+<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T1</span></code>
and <code class="computeroutput"><span class="identifier">T2</span></code> must be integral
types. Additionally, <code class="computeroutput"><span class="identifier">T1</span></code>
must have 8, 16 or 32 bits and <code class="computeroutput"><span class="identifier">T2</span></code>
@@ -917,7 +1085,8 @@
the paramter's type.
</p>
<p>
- <code class="computeroutput"><span class="identifier">uninterleave</span></code> returns an pair
+ <code class="computeroutput"><span class="identifier">uninterleave</span></code> returns an
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><></span></code>
where in the member <code class="computeroutput"><span class="identifier">first</span></code>
will be the integral represented in the even positions of <code class="computeroutput"><span class="identifier">number</span></code>
and in the <code class="computeroutput"><span class="identifier">second</span></code> member
@@ -1492,13 +1661,11 @@
<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"><></span></code> do not participate in overload
- resolution.
+ type.
</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"><></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"><></span></code> metafunction do not participate
- in overload resolution.
+ type.
</li>
</ul></div>
</li>
@@ -1529,13 +1696,11 @@
<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"><></span></code> do not participate in overload
- resolution.
+ type.
</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"><></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"><></span></code> metafunction do not participate
- in overload resolution.
+ type.
</li>
</ul></div>
</li>
@@ -1565,13 +1730,11 @@
<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"><></span></code> do not participate in overload
- resolution.
+ type.
</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"><></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"><></span></code> metafunction do not participate
- in overload resolution.
+ type.
</li>
</ul></div>
</li>
@@ -1602,13 +1765,11 @@
<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"><></span></code> do not participate in overload
- resolution.
+ type.
</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"><></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"><></span></code> metafunction do not participate
- in overload resolution.
+ type.
</li>
</ul></div>
</li>
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-13 13:30:32 EDT (Tue, 13 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="id36201172"></a>
+<a name="id36202101"></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="id36201292"></a>
+<a name="id36202222"></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-13 13:30:32 EDT (Tue, 13 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: July 12, 2010 at 21:09:34 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 13, 2010 at 17:26:20 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