Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61730 - sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer
From: muriloufg_at_[hidden]
Date: 2010-05-02 00:00:46


Author: murilov
Date: 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
New Revision: 61730
URL: http://svn.boost.org/trac/boost/changeset/61730

Log:
Missed to add the boost_integer directory under libs/doc/html/
Added:
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/cstdint.html (contents, props changed)
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html (contents, props changed)
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/integer.html (contents, props changed)
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/log2.html (contents, props changed)
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/mask.html (contents, props changed)
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/minmax.html (contents, props changed)
   sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/traits.html (contents, props changed)

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/cstdint.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/cstdint.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,257 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Standard Integer Types</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="../index.html" title="Boost.Integer">
+<link rel="next" href="traits.html" title="Integer Traits">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="traits.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Standard Integer Types">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_integer.cstdint"></a><a class="link" href="cstdint.html" title="Standard Integer Types"> Standard Integer Types</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section"> Rationale</span></dt>
+<dt><span class="section"> Caveat emptor</span></dt>
+<dt><span class="section"><a href="cstdint.html#boost_integer.cstdint.exact_width_integer_types">Exact-width
+ integer types</a></span></dt>
+<dt><span class="section"><a href="cstdint.html#boost_integer.cstdint.minimum_width_integer_types">Minimum-width
+ integer types</a></span></dt>
+<dt><span class="section"><a href="cstdint.html#boost_integer.cstdint.fastest_minimum_width_integer_types">Fastest
+ minimum-width integer types</a></span></dt>
+<dt><span class="section"><a href="cstdint.html#boost_integer.cstdint.greatest_width_integer_types">Greatest-width
+ integer types</a></span></dt>
+<dt><span class="section"><a href="cstdint.html#boost_integer.cstdint.integer_constant_macros">Integer
+ Constant Macros</a></span></dt>
+</dl></div>
+<div class="section" title="Overview">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.overview"></a><a class="link" href="cstdint.html#boost_integer.cstdint.overview" title="Overview">Overview</a>
+</h3></div></div></div>
+<p>
+ The header <code class="literal"><boost/cstdint.hpp></code>
+ provides the typedef's useful for writing portable code that requires certain
+ integer widths. All typedef's are in namespace boost.
+ </p>
+<p>
+ The specifications for these types are based on the ISO/IEC 9899:1999 C Language
+ standard header &lt;stdint.h&gt;. The 64-bit types required by the C standard
+ are <span class="emphasis"><em>not required</em></span> in the boost header, and may not be
+ supplied for all platforms/compilers, because <code class="literal">long long</code>
+ is not [yet] included in the C++ standard.
+ </p>
+<p>
+ See cstdint_test.cpp for
+ a test program.
+ </p>
+</div>
+<div class="section" title="Rationale">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.rationale"></a><a class="link" href="cstdint.html#boost_integer.cstdint.rationale" title="Rationale"> Rationale</a>
+</h3></div></div></div>
+<p>
+ The organization of the Boost.Integer headers and classes is designed to
+ take advantage of &lt;stdint.h&gt; types from the 1999 C standard without
+ causing undefined behavior in terms of the 1998 C++ standard. The header
+ &lt;boost/cstdint.hpp&gt; makes the standard integer types safely available
+ in namespace <code class="literal">boost</code> without placing any names in namespace
+ <code class="literal">std</code>. The intension is to complement rather than compete
+ with the C++ Standard Library. Should some future C++ standard include &lt;stdint.h&gt;
+ and &lt;cstdint&gt;, then &lt;boost/cstdint.hpp&gt; will continue to function,
+ but will become redundant and may be safely deprecated.
+ </p>
+<p>
+ Because these are boost headers, their names conform to boost header naming
+ conventions rather than C++ Standard Library header naming conventions.
+ </p>
+</div>
+<div class="section" title="Caveat emptor">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.ce"></a><a class="link" href="cstdint.html#boost_integer.cstdint.ce" title="Caveat emptor"> <span class="emphasis"><em>Caveat emptor</em></span></a>
+</h3></div></div></div>
+<p>
+ As an implementation artifact, certain C &lt;limits.h&gt; macro names may
+ possibly be visible to users of &lt;boost/cstdint.hpp&gt;. Don't use these
+ macros; they are not part of any Boost-specified interface. Use <code class="literal">boost::integer_traits&lt;&gt;</code>
+ or <code class="literal">std::numeric_limits&lt;&gt;</code> instead.
+ </p>
+<p>
+ As another implementation artifact, certain C &lt;stdint.h&gt; typedef names
+ may possibly be visible in the global namespace to users of &lt;boost/cstdint.hpp&gt;.
+ Don't use these names, they are not part of any Boost-specified interface.
+ Use the respective names in namespace <code class="literal">boost</code> instead.
+ </p>
+</div>
+<div class="section" title="Exact-width integer types">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.exact_width_integer_types"></a><a class="link" href="cstdint.html#boost_integer.cstdint.exact_width_integer_types" title="Exact-width integer types">Exact-width
+ integer types</a>
+</h3></div></div></div>
+<p>
+ The typedef <code class="literal">int#_t</code>, with # replaced by the width, designates
+ a signed integer type of exactly # bits; for example <code class="literal">int8_t</code>
+ denotes an 8-bit signed integer type. Similarly, the typedef <code class="literal">uint#_t</code>
+ designates an unsigned integer type of exactly # bits.
+ </p>
+<p>
+ These types are optional. However, if a platform supports integer types with
+ widths of 8, 16, 32, 64, or any combination thereof, then &lt;boost/cstdint.hpp&gt;
+ does provide the corresponding typedefs.
+ </p>
+<p>
+ The absence of int64_t and uint64_t is indicated by the macro <code class="computeroutput"><span class="identifier">BOOST_NO_INT64_T</span></code>.
+ </p>
+</div>
+<div class="section" title="Minimum-width integer types">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.minimum_width_integer_types"></a><a class="link" href="cstdint.html#boost_integer.cstdint.minimum_width_integer_types" title="Minimum-width integer types">Minimum-width
+ integer types</a>
+</h3></div></div></div>
+<p>
+ The typedef <code class="literal">int_least#_t</code>, with # replaced by the width,
+ designates a signed integer type with a width of at least # bits, such that
+ no signed integer type with lesser size has at least the specified width.
+ Thus, <code class="literal">int_least32_t</code> denotes the smallest signed integer
+ type with a width of at least 32 bits. Similarly, the typedef name <code class="literal">uint_least#_t</code>
+ designates an unsigned integer type with a width of at least # bits, such
+ that no unsigned integer type with lesser size has at least the specified
+ width.
+ </p>
+<p>
+ The following minimum-width integer types are provided for all platforms:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="literal">int_least8_t</code></li>
+<li class="listitem"><code class="literal">int_least16_t</code></li>
+<li class="listitem"><code class="literal">int_least32_t</code></li>
+<li class="listitem"><code class="literal">uint_least8_t</code></li>
+<li class="listitem"><code class="literal">uint_least16_t</code></li>
+<li class="listitem"><code class="literal">uint_least32_t</code></li>
+</ul></div>
+<p>
+ The following types are available only if, after including &lt;boost/cstdint.hpp&gt;,
+ the macro BOOST_NO_INT64_T is not defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="literal">int_least64_t</code></li>
+<li class="listitem"><code class="literal">uint_least64_t</code></li>
+</ul></div>
+<p>
+ All other minimum-width integer types are optional.
+ </p>
+</div>
+<div class="section" title="Fastest minimum-width integer types">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.fastest_minimum_width_integer_types"></a><a class="link" href="cstdint.html#boost_integer.cstdint.fastest_minimum_width_integer_types" title="Fastest minimum-width integer types">Fastest
+ minimum-width integer types</a>
+</h3></div></div></div>
+<p>
+ The typedef <code class="literal">int_fast#_t</code>, with # replaced by the width,
+ designates the fastest signed integer type with a width of at least # bits.
+ Similarly, the typedef name <code class="literal">uint_fast#_t</code> designates the
+ fastest unsigned integer type with a width of at least # bits.
+ </p>
+<p>
+ There is no guarantee that these types are fastest for all purposes. In any
+ case, however, they satisfy the signedness and width requirements.
+ </p>
+<p>
+ The following fastest minimum-width integer types are provided for all platforms:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="literal">int_fast8_t</code></li>
+<li class="listitem"><code class="literal">int_fast16_t</code></li>
+<li class="listitem"><code class="literal">int_fast32_t</code></li>
+<li class="listitem"><code class="literal">uint_fast8_t</code></li>
+<li class="listitem"><code class="literal">uint_fast16_t</code></li>
+<li class="listitem"><code class="literal">uint_fast32_t</code></li>
+</ul></div>
+<p>
+ The following types are available only if, after including &lt;boost/cstdint.hpp&gt;,
+ the macro BOOST_NO_INT64_T is not defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="literal">int_fast64_t</code></li>
+<li class="listitem"><code class="literal">uint_fast64_t</code></li>
+</ul></div>
+<p>
+ All other fastest minimum-width integer types are optional.
+ </p>
+</div>
+<div class="section" title="Greatest-width integer types">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.greatest_width_integer_types"></a><a class="link" href="cstdint.html#boost_integer.cstdint.greatest_width_integer_types" title="Greatest-width integer types">Greatest-width
+ integer types</a>
+</h3></div></div></div>
+<p>
+ The typedef <code class="literal">intmax_t </code>designates a signed integer type
+ capable of representing any value of any signed integer type.
+ </p>
+<p>
+ The typedef <code class="literal">uintmax_t</code> designates an unsigned integer type
+ capable of representing any value of any unsigned integer type.
+ </p>
+<p>
+ These types are provided for all platforms.
+ </p>
+</div>
+<div class="section" title="Integer Constant Macros">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.cstdint.integer_constant_macros"></a><a class="link" href="cstdint.html#boost_integer.cstdint.integer_constant_macros" title="Integer Constant Macros">Integer
+ Constant Macros</a>
+</h3></div></div></div>
+<p>
+ The following macros are always defined after inclusion of this header, these
+ allow integer constants of at least the specified width to be declared: INT8_C,
+ UINT8_C, INT16_C, UINT16_C, INT32_C, UINT32_C, INTMAX_C, UINTMAX_C.
+ </p>
+<p>
+ The macros INT64_C and UINT64_C are also defined if the the macro BOOST_NO_INT64_T
+ is not defined.
+ </p>
+<p>
+ The C99 macro __STDC_CONSTANT_MACROS is also defined as an artifact of the
+ implementation.
+ </p>
+<p>
+ For example:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cstdint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="comment">// Here the constant 0x1FFFFFFFF has the correct suffix applied:
+</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">INT64_C</span><span class="special">(</span><span class="number">0</span><span class="identifier">x1FFFFFFFF</span><span class="special">);</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="traits.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,82 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>History</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="minmax.html" title="Compile time min/max calculation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="minmax.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+<div class="section" title="History">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<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="id36189038"></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">
+<li class="listitem">
+ Reverted Trunk to release branch state (i.e. a "known good state").
+ </li>
+<li class="listitem">
+ Fixed issues: 653,
+ 3084,
+ 3177,
+ 3180,
+ 3568,
+ 3657,
+ 2134.
+ </li>
+<li class="listitem">
+ Added long long support to <code class="literal">boost::static_log2</code>, <code class="literal">boost::static_signed_min</code>,
+ <code class="literal">boost::static_signed_max</code>, <code class="literal">boost::static_unsigned_min</code><code class="literal">boost::static_unsigned_max</code>,
+ when available.
+ </li>
+<li class="listitem">
+ The argument type and the result type of <code class="literal">boost::static_signed_min</code>
+ etc are now typedef'd. Formerly, they were hardcoded as <code class="literal">unsigned
+ long</code> and <code class="literal">int</code> respectively. Please, use the provided
+ typedefs in new code (and update old code as soon as possible).
+ </li>
+</ul></div>
+<a name="boost_integer.history.1_32_0"></a><h5>
+<a name="id36189146"></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">
+ The argument type and the result type of <code class="literal">boost::static_log2</code>
+ are now typedef'd. Formerly, they were hardcoded as <code class="literal">unsigned long</code>
+ and <code class="literal">int</code> respectively. Please, use the provided typedefs
+ in new code (and update old code as soon as possible).
+ </li></ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="minmax.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/integer.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/integer.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,430 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Integer Type Selection</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="traits.html" title="Integer Traits">
+<link rel="next" href="mask.html" title="Integer Masks">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="traits.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mask.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Integer Type Selection">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_integer.integer"></a><a class="link" href="integer.html" title="Integer Type Selection"> Integer Type Selection</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Synopsis</span></dt>
+<dt><span class="section"><a href="integer.html#boost_integer.integer.easiest"> Easiest-to-Manipulate
+ Types</a></span></dt>
+<dt><span class="section"> Sized Types</span></dt>
+<dt><span class="section">Example</span></dt>
+<dt><span class="section"><a href="integer.html#boost_integer.integer.demonstration_program">Demonstration
+ Program</a></span></dt>
+<dt><span class="section">Rationale</span></dt>
+<dt><span class="section">Alternative</span></dt>
+<dt><span class="section">Credits</span></dt>
+</dl></div>
+<p>
+ The <boost/integer.hpp>
+ type selection templates allow integer types to be selected based on desired
+ characteristics such as number of bits or maximum value. This facility is particularly
+ useful for solving generic programming problems.
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.synopsis"></a><a class="link" href="integer.html#boost_integer.integer.synopsis" title="Synopsis"> Synopsis</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="comment">// fast integers from least integers
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">LeastInt</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">int_fast_t</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="comment">// signed
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="identifier">Bits</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">int_t</span>
+ <span class="special">{</span>
+ <span class="comment">/* Member exact may or may not be defined depending upon Bits */</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">exact</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">int_fast_t</span><span class="special">&lt;</span><span class="identifier">least</span><span class="special">&gt;::</span><span class="identifier">fast</span> <span class="identifier">fast</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="comment">// unsigned
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="identifier">Bits</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">uint_t</span>
+ <span class="special">{</span>
+ <span class="comment">/* Member exact may or may not be defined depending upon Bits */</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">exact</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">int_fast_t</span><span class="special">&lt;</span><span class="identifier">least</span><span class="special">&gt;::</span><span class="identifier">fast</span> <span class="identifier">fast</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="comment">// signed
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">MaxValue</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">int_max_value_t</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">int_fast_t</span><span class="special">&lt;</span><span class="identifier">least</span><span class="special">&gt;::</span><span class="identifier">fast</span> <span class="identifier">fast</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">MinValue</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">int_min_value_t</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">int_fast_t</span><span class="special">&lt;</span><span class="identifier">least</span><span class="special">&gt;::</span><span class="identifier">fast</span> <span class="identifier">fast</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="comment">// unsigned
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">uint_value_t</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">int_fast_t</span><span class="special">&lt;</span><span class="identifier">least</span><span class="special">&gt;::</span><span class="identifier">fast</span> <span class="identifier">fast</span><span class="special">;</span>
+ <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+</div>
+<div class="section" title="Easiest-to-Manipulate Types">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.easiest"></a><a class="link" href="integer.html#boost_integer.integer.easiest" title="Easiest-to-Manipulate Types"> Easiest-to-Manipulate
+ Types</a>
+</h3></div></div></div>
+<p>
+ The <code class="literal">int_fast_t</code> class template maps its input type to the
+ next-largest type that the processor can manipulate the easiest, or to itself
+ if the input type is already an easy-to-manipulate type. For instance, processing
+ a bunch of <code class="literal">char</code> objects may go faster if they were converted
+ to <code class="literal">int</code> objects before processing. The input type, passed
+ as the only template parameter, must be a built-in integral type, except
+ <code class="literal">bool</code>. Unsigned integral types can be used, as well as
+ signed integral types. The output type is given as the nested type <code class="literal">fast</code>.
+ </p>
+<p>
+ <span class="bold"><strong>Implementation Notes:</strong></span> By default, the output
+ type is identical to the input type. Eventually, this code's implementation
+ should be customized for each platform to give accurate mappings between
+ the built-in types and the easiest-to-manipulate built-in types. Also, there
+ is no guarantee that the output type actually is easier to manipulate than
+ the input type.
+ </p>
+</div>
+<div class="section" title="Sized Types">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.sized"></a><a class="link" href="integer.html#boost_integer.integer.sized" title="Sized Types"> Sized Types</a>
+</h3></div></div></div>
+<p>
+ The <code class="literal">int_t</code>, <code class="literal">uint_t</code>, <code class="literal">int_max_value_t</code>,
+ <code class="literal">int_min_value_t</code>, and <code class="literal">uint_value_t</code> class
+ templates find the most appropiate built-in integral type for the given template
+ parameter. This type is given by the nested type <code class="literal">least</code>.
+ The easiest-to-manipulate version of that type is given by the nested type
+ <code class="literal">fast</code>. The following table describes each template's criteria.
+ </p>
+<div class="table">
+<a name="boost_integer.integer.sized.criteria_for_the_sized_type_class_templates"></a><p class="title"><b>Table&#160;1.&#160;Criteria for the Sized Type Class Templates</b></p>
+<div class="table-contents"><table class="table" summary="Criteria for the Sized Type Class Templates">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Class Template
+ </p>
+ </th>
+<th>
+ <p>
+ Template Parameter Mapping
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_t&lt;N&gt;::least</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, built-in, signed integral type with at least <span class="emphasis"><em>N</em></span>
+ bits, including the sign bit. The parameter should be a positive number.
+ A compile-time error results if the parameter is larger than the number
+ of bits in the largest integer type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_t&lt;N&gt;::fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate, built-in, signed integral type with at least
+ <span class="emphasis"><em>N</em></span> bits, including the sign bit. The parameter
+ should be a positive number. A compile-time error results if the parameter
+ is larger than the number of bits in the largest integer type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_t&lt;N&gt;::exact</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A built-in, signed integral type with exactly <span class="emphasis"><em>N</em></span>
+ bits, including the sign bit. The parameter should be a positive number.
+ Note that the member <span class="emphasis"><em>exact</em></span> is defined <span class="bold"><strong>only</strong></span> if there exists a type with exactly <span class="emphasis"><em>N</em></span>
+ bits.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::uint_t&lt;N&gt;::least</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, built-in, unsigned integral type with at least <span class="emphasis"><em>N</em></span>
+ bits. The parameter should be a positive number. A compile-time error
+ results if the parameter is larger than the number of bits in the largest
+ integer type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::uint_t&lt;N&gt;::fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate, built-in, unsigned integral type with at
+ least <span class="emphasis"><em>N</em></span> bits. The parameter should be a positive
+ number. A compile-time error results if the parameter is larger than
+ the number of bits in the largest integer type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::uint_t&lt;N&gt;::exact</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A built-in, unsigned integral type with exactly <span class="emphasis"><em>N</em></span>
+ bits. The parameter should be a positive number. A compile-time error
+ results if the parameter is larger than the number of bits in the largest
+ integer type. Note that the member <span class="emphasis"><em>exact</em></span> is defined
+ <span class="bold"><strong>only</strong></span> if there exists a type with exactly
+ N bits.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_max_value_t&lt;V&gt;::last</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, built-in, signed integral type that can hold all the
+ values in the inclusive range <span class="emphasis"><em>0 - V</em></span>. The parameter
+ should be a positive number.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_max_value_t&lt;V&gt;::fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate, built-in, signed integral type that can
+ hold all the values in the inclusive range <span class="emphasis"><em>0 - V</em></span>.
+ The parameter should be a positive number.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_min_value_t&lt;V&gt;::least</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, built-in, signed integral type that can hold all the
+ values in the inclusive range <span class="emphasis"><em>V - 0</em></span>. The parameter
+ should be a negative number.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::int_min_value_t&lt;V&gt;::fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate, built-in, signed integral type that can
+ hold all the values in the inclusive range <span class="emphasis"><em>V - 0</em></span>.
+ The parameter should be a negative number.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::uint_value_t&lt;V&gt;::least</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, built-in, unsigned integral type that can hold all positive
+ values up to and including <span class="emphasis"><em>V</em></span>. The parameter should
+ be a positive number.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">boost::uint_value_t&lt;V&gt;::fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate, built-in, unsigned integral type that can
+ hold all positive values up to and including <span class="emphasis"><em>V</em></span>.
+ The parameter should be a positive number.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+<div class="section" title="Example">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.example"></a><a class="link" href="integer.html#boost_integer.integer.example" title="Example">Example</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="comment">//...
+</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_t</span><span class="special">&lt;</span><span class="number">24</span><span class="special">&gt;::</span><span class="identifier">least</span> <span class="identifier">my_var</span><span class="special">;</span> <span class="comment">// my_var has at least 24-bits
+</span> <span class="comment">//...
+</span> <span class="comment">// This one is guarenteed not to be truncated:
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_max_value_t</span><span class="special">&lt;</span><span class="number">1000</span><span class="special">&gt;::</span><span class="identifier">least</span> <span class="identifier">my1000</span> <span class="special">=</span> <span class="number">1000</span><span class="special">;</span>
+ <span class="comment">//...
+</span> <span class="comment">// This one is guarenteed not to be truncated, and as fast
+</span> <span class="comment">// to manipulate as possible, its size may be greater than
+</span> <span class="comment">// that of my1000:
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_max_value_t</span><span class="special">&lt;</span><span class="number">1000</span><span class="special">&gt;::</span><span class="identifier">fast</span> <span class="identifier">my_fast1000</span> <span class="special">=</span> <span class="number">1000</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section" title="Demonstration Program">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.demonstration_program"></a><a class="link" href="integer.html#boost_integer.integer.demonstration_program" title="Demonstration Program">Demonstration
+ Program</a>
+</h3></div></div></div>
+<p>
+ The program integer_test.cpp
+ is a simplistic demonstration of the results from instantiating various examples
+ of the sized type class templates.
+ </p>
+</div>
+<div class="section" title="Rationale">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.rationale"></a><a class="link" href="integer.html#boost_integer.integer.rationale" title="Rationale">Rationale</a>
+</h3></div></div></div>
+<p>
+ The rationale for the design of the templates in this header includes:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Avoid recursion because of concern about C++'s limited guaranteed recursion
+ depth (17).
+ </li>
+<li class="listitem">
+ Avoid macros on general principles.
+ </li>
+<li class="listitem">
+ Try to keep the design as simple as possible.
+ </li>
+</ul></div>
+</div>
+<div class="section" title="Alternative">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.alternative"></a><a class="link" href="integer.html#boost_integer.integer.alternative" title="Alternative">Alternative</a>
+</h3></div></div></div>
+<p>
+ If the number of bits required is known beforehand, it may be more appropriate
+ to use the types supplied in <boost/cstdint.hpp>.
+ </p>
+</div>
+<div class="section" title="Credits">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.integer.credits"></a><a class="link" href="integer.html#boost_integer.integer.credits" title="Credits">Credits</a>
+</h3></div></div></div>
+<p>
+ The author of most of the Boost integer type choosing templates is Beman Dawes. He
+ gives thanks to Valentin Bonnard and <a href="http://www.boost.org/people/kevlin_henney.htm" target="_top">Kevlin
+ Henney</a> for sharing their designs for similar templates. <a href="http://www.boost.org/people/daryle_walker.html" target="_top">Daryle
+ Walker</a> designed the value-based sized templates.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="traits.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mask.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/log2.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/log2.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,151 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Compile Time log2 Calculation</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="mask.html" title="Integer Masks">
+<link rel="next" href="minmax.html" title="Compile time min/max calculation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mask.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="minmax.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Compile Time log2 Calculation">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_integer.log2"></a><a class="link" href="log2.html" title="Compile Time log2 Calculation"> Compile Time log2 Calculation</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section">Usage</span></dt>
+<dt><span class="section"><a href="log2.html#boost_integer.log2.demonstration_program">Demonstration
+ Program</a></span></dt>
+<dt><span class="section">Rationale</span></dt>
+<dt><span class="section">Credits</span></dt>
+</dl></div>
+<p>
+ The class template in <boost/integer/static_log2.hpp>
+ determines the position of the highest bit in a given value. This facility
+ is useful for solving generic programming problems.
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.log2.synopsis"></a><a class="link" href="log2.html#boost_integer.log2.synopsis" title="Synopsis">Synopsis</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined</em></span> <span class="identifier">static_log2_argument_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined</em></span> <span class="identifier">static_log2_result_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">static_log2_argument_type</span> <span class="identifier">arg</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">static_log2</span>
+ <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">static_log2_result_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="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">static_log2</span><span class="special">&lt;</span> <span class="number">0</span> <span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="comment">// The logarithm of zero is undefined.
+</span> <span class="special">};</span>
+
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+</div>
+<div class="section" title="Usage">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.log2.usage"></a><a class="link" href="log2.html#boost_integer.log2.usage" title="Usage">Usage</a>
+</h3></div></div></div>
+<p>
+ The <code class="literal">boost::static_log2</code> class template takes one template
+ parameter, a value of type <code class="literal">static_log2_argument_type</code>.
+ The template only defines one member, <code class="literal">value</code>, which gives
+ the truncated, base-two logarithm of the template argument.
+ </p>
+<p>
+ Since the logarithm of zero, for any base, is undefined, there is a specialization
+ of <code class="literal">static_log2</code> for a template argument of zero. This specialization
+ has no members, so an attempt to use the base-two logarithm of zero results
+ in a compile-time error.
+ </p>
+<p>
+ Note:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="literal">static_log2_argument_type</code> is an <span class="emphasis"><em>unsigned integer
+ type</em></span> (C++ standard, 3.9.1p3).
+ </li>
+<li class="listitem">
+<code class="literal">static_log2_result_type</code> is an <span class="emphasis"><em>integer type</em></span>
+ (C++ standard, 3.9.1p7).
+ </li>
+</ul></div>
+</div>
+<div class="section" title="Demonstration Program">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.log2.demonstration_program"></a><a class="link" href="log2.html#boost_integer.log2.demonstration_program" title="Demonstration Program">Demonstration
+ Program</a>
+</h3></div></div></div>
+<p>
+ The program static_log2_test.cpp
+ is a simplistic demonstration of the results from instantiating various examples
+ of the binary logarithm class template.
+ </p>
+</div>
+<div class="section" title="Rationale">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.log2.rationale"></a><a class="link" href="log2.html#boost_integer.log2.rationale" title="Rationale">Rationale</a>
+</h3></div></div></div>
+<p>
+ The base-two (binary) logarithm, abbreviated lb, function is occasionally
+ used to give order-estimates of computer algorithms. The truncated logarithm
+ can be considered the highest power-of-two in a value, which corresponds
+ to the value's highest set bit (for binary integers). Sometimes the highest-bit
+ position could be used in generic programming, which requires the position
+ to be available statically (<span class="emphasis"><em>i.e.</em></span> at compile-time).
+ </p>
+</div>
+<div class="section" title="Credits">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.log2.credits"></a><a class="link" href="log2.html#boost_integer.log2.credits" title="Credits">Credits</a>
+</h3></div></div></div>
+<p>
+ The original version of the Boost binary logarithm class template was written
+ by Daryle Walker
+ and then enhanced by Giovanni Bajo with support for compilers without partial
+ template specialization. The current version was suggested, together with
+ a reference implementation, by Vesa Karvonen. Gennaro Prota wrote the actual
+ source file.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mask.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="minmax.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/mask.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/mask.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,375 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Integer Masks</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="integer.html" title="Integer Type Selection">
+<link rel="next" href="log2.html" title="Compile Time log2 Calculation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="integer.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="log2.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Integer Masks">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_integer.mask"></a><a class="link" href="mask.html" title="Integer Masks"> Integer Masks</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section"><a href="mask.html#boost_integer.mask.single_bit_mask_class_template">Single
+ Bit-Mask Class Template</a></span></dt>
+<dt><span class="section"><a href="mask.html#boost_integer.mask.group_bit_mask_class_template">Group
+ Bit-Mask Class Template</a></span></dt>
+<dt><span class="section"><a href="mask.html#boost_integer.mask.implementation_notes">Implementation
+ Notes</a></span></dt>
+<dt><span class="section">Example</span></dt>
+<dt><span class="section"><a href="mask.html#boost_integer.mask.demonstration_program">Demonstration
+ Program</a></span></dt>
+<dt><span class="section">Rationale</span></dt>
+<dt><span class="section">Credits</span></dt>
+</dl></div>
+<div class="section" title="Overview">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.overview"></a><a class="link" href="mask.html#boost_integer.mask.overview" title="Overview">Overview</a>
+</h3></div></div></div>
+<p>
+ The class templates in <boost/integer/integer_mask.hpp>
+ provide bit masks for a certain bit position or a contiguous-bit pack of
+ a certain size. The types of the masking constants come from the <a class="link" href="integer.html" title="Integer Type Selection">integer
+ type selection templates</a> header.
+ </p>
+</div>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.synopsis"></a><a class="link" href="mask.html#boost_integer.mask.synopsis" title="Synopsis">Synopsis</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cstddef</span><span class="special">&gt;</span> <span class="comment">// for std::size_t
+</span>
+<span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Bit</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">high_bit_mask_t</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">fast</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">least</span> <span class="identifier">high_bit</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">fast</span> <span class="identifier">high_bit_fast</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">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">bit_position</span> <span class="special">=</span> <span class="identifier">Bit</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Bits</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">low_bits_mask_t</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">least</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined-type</em></span> <span class="identifier">fast</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">least</span> <span class="identifier">sig_bits</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">fast</span> <span class="identifier">sig_bits_fast</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">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">bit_count</span> <span class="special">=</span> <span class="identifier">Bits</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="comment">// Specializations for low_bits_mask_t exist for certain bit counts.
+</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+</div>
+<div class="section" title="Single Bit-Mask Class Template">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.single_bit_mask_class_template"></a><a class="link" href="mask.html#boost_integer.mask.single_bit_mask_class_template" title="Single Bit-Mask Class Template">Single
+ Bit-Mask Class Template</a>
+</h3></div></div></div>
+<p>
+ The <code class="literal">boost::high_bit_mask_t</code> class template provides constants
+ for bit masks representing the bit at a certain position. The masks are equivalent
+ to the value 2<sup>Bit</sup>, where <code class="literal">Bit</code> is the template parameter.
+ The bit position must be a nonnegative number from zero to <span class="emphasis"><em>Max</em></span>,
+ where Max is one less than the number of bits supported by the largest unsigned
+ built-in integral type. The following table describes the members of an instantiation
+ of <code class="literal">high_bit_mask_t</code>.
+ </p>
+<div class="table">
+<a name="boost_integer.mask.single_bit_mask_class_template.members_of_the__boost__high_bit_mask_t__class_template"></a><p class="title"><b>Table&#160;2.&#160;Members of the `boost::high_bit_mask_t` Class Template</b></p>
+<div class="table-contents"><table class="table" summary="Members of the `boost::high_bit_mask_t` Class Template">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Member
+ </p>
+ </th>
+<th>
+ <p>
+ Meaning
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="literal">least</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, unsigned, built-in type that supports the given bit position.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate analog of <code class="literal">least</code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">high_bit</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <code class="literal">least</code> constant of the value 2<sup>Bit</sup>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">high_bit_fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <code class="literal">fast</code> analog of <code class="literal">high_bit</code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">bit_position</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The value of the template parameter, in case its needed from a renamed
+ instantiation of the class template.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+<div class="section" title="Group Bit-Mask Class Template">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.group_bit_mask_class_template"></a><a class="link" href="mask.html#boost_integer.mask.group_bit_mask_class_template" title="Group Bit-Mask Class Template">Group
+ Bit-Mask Class Template</a>
+</h3></div></div></div>
+<p>
+ The <code class="literal">boost::low_bits_mask_t</code> class template provides constants
+ for bit masks equivalent to the value (2<sup>Bits</sup> - 1), where <code class="literal">Bits</code>
+ is the template parameter. The parameter <code class="literal">Bits</code> must be
+ a non-negative integer from zero to <span class="emphasis"><em>Max</em></span>, where Max is
+ the number of bits supported by the largest, unsigned, built-in integral
+ type. The following table describes the members of <code class="literal">low_bits_mask_t</code>.
+ </p>
+<div class="table">
+<a name="boost_integer.mask.group_bit_mask_class_template.members_of_the___boost__low_bits_mask_t__class_template"></a><p class="title"><b>Table&#160;3.&#160;Members of the [^boost::low_bits_mask_t] Class Template</b></p>
+<div class="table-contents"><table class="table" summary="Members of the [^boost::low_bits_mask_t] Class Template">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Member
+ </p>
+ </th>
+<th>
+ <p>
+ Meaning
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="literal">least</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The smallest, unsigned built-in type that supports the given bit count.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The easiest-to-manipulate analog of <code class="literal">least</code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">sig_bits</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <code class="literal">least</code> constant of the desired bit-masking value.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">sig_bits_fast</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <code class="literal">fast</code> analog of <code class="literal">sig_bits</code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">bit_count</code>
+ </p>
+ </td>
+<td>
+ <p>
+ The value of the template parameter, in case its needed from a renamed
+ instantiation of the class template.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+<div class="section" title="Implementation Notes">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.implementation_notes"></a><a class="link" href="mask.html#boost_integer.mask.implementation_notes" title="Implementation Notes">Implementation
+ Notes</a>
+</h3></div></div></div>
+<p>
+ When <code class="literal">Bits</code> is the exact size of a built-in unsigned type,
+ the implementation has to change to prevent undefined behavior. Therefore,
+ there are specializations of <code class="literal">low_bits_mask_t</code> at those
+ bit counts.
+ </p>
+</div>
+<div class="section" title="Example">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.example"></a><a class="link" href="mask.html#boost_integer.mask.example" title="Example">Example</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">integer_mask</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="comment">//...
+</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">high_bit_mask_t</span><span class="special">&lt;</span><span class="number">29</span><span class="special">&gt;</span> <span class="identifier">mask1_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">low_bits_mask_t</span><span class="special">&lt;</span><span class="number">15</span><span class="special">&gt;</span> <span class="identifier">mask2_type</span><span class="special">;</span>
+
+ <span class="identifier">mask1_type</span><span class="special">::</span><span class="identifier">least</span> <span class="identifier">my_var1</span><span class="special">;</span>
+ <span class="identifier">mask2_type</span><span class="special">::</span><span class="identifier">fast</span> <span class="identifier">my_var2</span><span class="special">;</span>
+ <span class="comment">//...
+</span>
+ <span class="identifier">my_var1</span> <span class="special">|=</span> <span class="identifier">mask1_type</span><span class="special">::</span><span class="identifier">high_bit</span><span class="special">;</span>
+ <span class="identifier">my_var2</span> <span class="special">&amp;=</span> <span class="identifier">mask2_type</span><span class="special">::</span><span class="identifier">sig_bits_fast</span><span class="special">;</span>
+
+ <span class="comment">//...
+</span><span class="special">}</span>
+</pre>
+</div>
+<div class="section" title="Demonstration Program">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.demonstration_program"></a><a class="link" href="mask.html#boost_integer.mask.demonstration_program" title="Demonstration Program">Demonstration
+ Program</a>
+</h3></div></div></div>
+<p>
+ The program integer_mask_test.cpp
+ is a simplistic demonstration of the results from instantiating various examples
+ of the bit mask class templates.
+ </p>
+</div>
+<div class="section" title="Rationale">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.rationale"></a><a class="link" href="mask.html#boost_integer.mask.rationale" title="Rationale">Rationale</a>
+</h3></div></div></div>
+<p>
+ The class templates in this header are an extension of the <a class="link" href="integer.html" title="Integer Type Selection">integer
+ type selection class templates</a>. The new class templates provide the
+ same sized types, but also convenient masks to use when extracting the highest
+ or all the significant bits when the containing built-in type contains more
+ bits. This prevents contamination of values by the higher, unused bits.
+ </p>
+</div>
+<div class="section" title="Credits">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.mask.credits"></a><a class="link" href="mask.html#boost_integer.mask.credits" title="Credits">Credits</a>
+</h3></div></div></div>
+<p>
+ The author of the Boost bit mask class templates is <a href="http://www.boost.org/people/daryle_walker.html" target="_top">Daryle
+ Walker</a>.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="integer.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="log2.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/minmax.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/minmax.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,160 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Compile time min/max calculation</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="log2.html" title="Compile Time log2 Calculation">
+<link rel="next" href="history.html" title="History">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="log2.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Compile time min/max calculation">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_integer.minmax"></a><a class="link" href="minmax.html" title="Compile time min/max calculation"> Compile time min/max calculation</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section">Usage</span></dt>
+<dt><span class="section">Example</span></dt>
+<dt><span class="section"><a href="minmax.html#boost_integer.minmax.demonstration_program">Demonstration
+ Program</a></span></dt>
+<dt><span class="section">Rationale</span></dt>
+<dt><span class="section">Credits</span></dt>
+</dl></div>
+<p>
+ The class templates in <boost/integer/static_min_max.hpp>
+ provide a compile-time evaluation of the minimum or maximum of two integers.
+ These facilities are useful for generic programming problems.
+ </p>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.minmax.synopsis"></a><a class="link" href="minmax.html#boost_integer.minmax.synopsis" title="Synopsis">Synopsis</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+
+<span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined</em></span> <span class="identifier">static_min_max_signed_type</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="emphasis"><em>implementation-defined</em></span> <span class="identifier">static_min_max_unsigned_type</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">static_min_max_signed_type</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">static_min_max_signed_type</span> <span class="identifier">Value2</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">static_signed_min</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">static_min_max_signed_type</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">static_min_max_signed_type</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">static_signed_max</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">static_min_max_unsigned_type</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">static_min_max_unsigned_type</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">static_unsigned_min</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">static_min_max_unsigned_type</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">static_min_max_unsigned_type</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">static_unsigned_max</span><span class="special">;</span>
+
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section" title="Usage">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.minmax.usage"></a><a class="link" href="minmax.html#boost_integer.minmax.usage" title="Usage">Usage</a>
+</h3></div></div></div>
+<p>
+ The four class templates provide the combinations for finding the minimum
+ or maximum of two <code class="literal">signed</code> or <code class="literal">unsigned</code>
+ (<code class="literal">long</code>) parameters, <span class="emphasis"><em>Value1</em></span> and <span class="emphasis"><em>Value2</em></span>,
+ at compile-time. Each template has a single static data member, <code class="literal">value</code>,
+ which is set to the respective minimum or maximum of the template's parameters.
+ </p>
+</div>
+<div class="section" title="Example">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.minmax.example"></a><a class="link" href="minmax.html#boost_integer.minmax.example" title="Example">Example</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">integer</span><span class="special">/</span><span class="identifier">static_min_max</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="identifier">AddendSize1</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="identifier">AddendSize2</span> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">adder</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <span class="identifier">addend1_size</span> <span class="special">=</span> <span class="identifier">AddendSize1</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <span class="identifier">addend2_size</span> <span class="special">=</span> <span class="identifier">AddendSize2</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <span class="identifier">sum_size</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">static_unsigned_max</span><span class="special">&lt;</span><span class="identifier">AddendSize1</span><span class="special">,</span> <span class="identifier">AddendSize2</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="special">+</span> <span class="number">1</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">addend1_type</span><span class="special">[</span> <span class="identifier">addend1_size</span> <span class="special">];</span>
+ <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">addend2_type</span><span class="special">[</span> <span class="identifier">addend2_size</span> <span class="special">];</span>
+ <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">sum_type</span><span class="special">[</span> <span class="identifier">sum_size</span> <span class="special">];</span>
+
+ <span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">()(</span> <span class="identifier">addend1_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">addend2_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="identifier">a2</span><span class="special">,</span> <span class="identifier">sum_type</span> <span class="special">&amp;</span><span class="identifier">s</span> <span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="comment">//...
+</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">int</span> <span class="keyword">const</span> <span class="identifier">a1</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0</span><span class="special">,</span> <span class="number">4</span><span class="special">,</span> <span class="number">3</span> <span class="special">};</span> <span class="comment">// 340
+</span> <span class="keyword">int</span> <span class="keyword">const</span> <span class="identifier">a2</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">9</span><span class="special">,</span> <span class="number">8</span> <span class="special">};</span> <span class="comment">// 89
+</span> <span class="keyword">int</span> <span class="identifier">s</span><span class="special">[</span> <span class="number">4</span> <span class="special">];</span>
+ <span class="identifier">adder</span><span class="special">&lt;</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">&gt;</span> <span class="identifier">obj</span><span class="special">;</span>
+
+ <span class="identifier">obj</span><span class="special">(</span> <span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="identifier">s</span> <span class="special">);</span> <span class="comment">// 's' should be 429 or { 9, 2, 4, 0 }
+</span> <span class="comment">//...
+</span><span class="special">}</span>
+</pre>
+</div>
+<div class="section" title="Demonstration Program">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.minmax.demonstration_program"></a><a class="link" href="minmax.html#boost_integer.minmax.demonstration_program" title="Demonstration Program">Demonstration
+ Program</a>
+</h3></div></div></div>
+<p>
+ The program static_min_max_test.cpp
+ is a simplistic demonstration of various comparisons using the compile-time
+ extrema class templates.
+ </p>
+</div>
+<div class="section" title="Rationale">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.minmax.rationale"></a><a class="link" href="minmax.html#boost_integer.minmax.rationale" title="Rationale">Rationale</a>
+</h3></div></div></div>
+<p>
+ Sometimes the minimum or maximum of several values needs to be found for
+ later compile-time processing, <span class="emphasis"><em>e.g.</em></span> for a bound for
+ another class template.
+ </p>
+</div>
+<div class="section" title="Credits">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.minmax.credits"></a><a class="link" href="minmax.html#boost_integer.minmax.credits" title="Credits">Credits</a>
+</h3></div></div></div>
+<p>
+ The author of the Boost compile-time extrema class templates is <a href="http://www.boost.org/people/daryle_walker.html" target="_top">Daryle
+ Walker</a>.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="log2.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/traits.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/traits.html 2010-05-02 00:00:45 EDT (Sun, 02 May 2010)
@@ -0,0 +1,215 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Integer Traits</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../index.html" title="Boost.Integer">
+<link rel="up" href="../index.html" title="Boost.Integer">
+<link rel="prev" href="cstdint.html" title="Standard Integer Types">
+<link rel="next" href="integer.html" title="Integer Type Selection">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="cstdint.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="integer.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Integer Traits">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_integer.traits"></a><a class="link" href="traits.html" title="Integer Traits"> Integer Traits</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Motivation</span></dt>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section">Description</span></dt>
+<dt><span class="section">Test Program</span></dt>
+<dt><span class="section">Acknowledgements</span></dt>
+</dl></div>
+<div class="section" title="Motivation">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.traits.motivation"></a><a class="link" href="traits.html#boost_integer.traits.motivation" title="Motivation">Motivation</a>
+</h3></div></div></div>
+<p>
+ The C++ Standard Library &lt;limits&gt; header supplies a class template
+ <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code>
+ with specializations for each fundamental type.
+ </p>
+<p>
+ For integer types, the interesting members of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code> are:
+ </p>
+<pre class="programlisting"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_specialized</span><span class="special">;</span> <span class="comment">// Will be true for integer types.
+</span><span class="keyword">static</span> <span class="identifier">T</span> <span class="identifier">min</span><span class="special">()</span> <span class="keyword">throw</span><span class="special">();</span> <span class="comment">// Smallest representable value.
+</span><span class="keyword">static</span> <span class="identifier">T</span> <span class="identifier">max</span><span class="special">()</span> <span class="keyword">throw</span><span class="special">();</span> <span class="comment">// Largest representable value.
+</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">digits</span><span class="special">;</span> <span class="comment">// For integers, the number of value bits.
+</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">digits10</span><span class="special">;</span> <span class="comment">// The number of base 10 digits that can be represented.
+</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_signed</span><span class="special">;</span> <span class="comment">// True if the type is signed.
+</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_integer</span><span class="special">;</span> <span class="comment">// Will be true for all integer types.
+</span></pre>
+<p>
+ For many uses, these are sufficient. But min() and max() are problematical
+ because they are not constant expressions (std::5.19), yet some usages require
+ constant expressions.
+ </p>
+<p>
+ The template class <code class="literal">integer_traits</code> addresses this problem.
+ </p>
+</div>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.traits.synopsis"></a><a class="link" href="traits.html#boost_integer.traits.synopsis" title="Synopsis">Synopsis</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">integer_traits</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_integral</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="comment">//
+</span> <span class="comment">// These members are defined only if T is a built-in
+</span> <span class="comment">// integal type:
+</span> <span class="comment">//
+</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">const_min</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">const_max</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>
+</pre>
+</div>
+<div class="section" title="Description">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.traits.description"></a><a class="link" href="traits.html#boost_integer.traits.description" title="Description">Description</a>
+</h3></div></div></div>
+<p>
+ Template class <code class="literal">integer_traits</code> is derived from <code class="literal">std::numeric_limits</code>.
+ The primary specialization adds the single <code class="literal">bool</code> member
+ <code class="literal">is_integral</code> with the compile-time constant value <code class="literal">false</code>.
+ However, for all integral types <code class="literal">T</code> (std::3.9.1/7 [basic.fundamental]),
+ there are specializations provided with the following compile-time constants
+ defined:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ member
+ </p>
+ </th>
+<th>
+ <p>
+ type
+ </p>
+ </th>
+<th>
+ <p>
+ value
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="literal">is_integral</code>
+ </p>
+ </td>
+<td>
+ <p>
+ bool
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">true</code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">const_min</code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">T</code>
+ </p>
+ </td>
+<td>
+ <p>
+ equivalent to <code class="literal">std::numeric_limits&lt;T&gt;::min()</code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">const_max</code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">T</code>
+ </p>
+ </td>
+<td>
+ <p>
+ equivalent to <code class="literal">std::numeric_limits&lt;T&gt;::max()</code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Note: The <span class="emphasis"><em>is_integral</em></span> flag is provided, because a user-defined
+ integer class should specialize <code class="literal">std::numeric_limits&lt;&gt;::is_integer
+ = true</code>, while compile-time constants <code class="literal">const_min</code>
+ and <code class="literal">const_max</code> are not provided for that user-defined class,
+ unless boost::integer_traits is also specialized.
+ </p>
+</div>
+<div class="section" title="Test Program">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.traits.test_program"></a><a class="link" href="traits.html#boost_integer.traits.test_program" title="Test Program">Test Program</a>
+</h3></div></div></div>
+<p>
+ The program <code class="literal">integer_traits_test.cpp</code>
+ exercises the <code class="literal">integer_traits</code> class.
+ </p>
+</div>
+<div class="section" title="Acknowledgements">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_integer.traits.acknowledgements"></a><a class="link" href="traits.html#boost_integer.traits.acknowledgements" title="Acknowledgements">Acknowledgements</a>
+</h3></div></div></div>
+<p>
+ Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers discussed the integer
+ traits idea on the boost mailing list in August 1999.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
+ John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="cstdint.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="integer.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>


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