Added support for exact width integer type to int_t and uint_t

Updated docs to match.
Fixes #1225.

[SVN r57941]
This commit is contained in:
John Maddock
2009-11-26 11:08:27 +00:00
parent ca84baa55d
commit ac155d3843
9 changed files with 338 additions and 338 deletions

View File

@ -26,7 +26,7 @@
<a name="boost_integer.history"></a><a class="link" href="history.html" title="History"> History</a>
</h2></div></div></div>
<a name="boost_integer.history.1_42_0"></a><h5>
<a name="id677364"></a>
<a name="id785558"></a>
<a class="link" href="history.html#boost_integer.history.1_42_0">1.42.0</a>
</h5>
<div class="itemizedlist"><ul type="disc">
@ -55,7 +55,7 @@
</li>
</ul></div>
<a name="boost_integer.history.1_32_0"></a><h5>
<a name="id677466"></a>
<a name="id785660"></a>
<a class="link" href="history.html#boost_integer.history.1_32_0">1.32.0</a>
</h5>
<div class="itemizedlist"><ul type="disc"><li>

View File

@ -61,6 +61,8 @@
</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>
@ -69,6 +71,8 @@
</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>
@ -136,7 +140,7 @@
<code class="literal">fast</code>. The following table describes each template's criteria.
</p>
<div class="table">
<a name="id673121"></a><p class="title"><b>Table<EFBFBD>1.<2E>Criteria for the Sized Type Class Templates</b></p>
<a name="id781298"></a><p class="title"><b>Table<EFBFBD>1.<2E>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>
@ -166,7 +170,9 @@
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.
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 is a type
with exactly N bits.
</p>
</td>
</tr>
@ -181,7 +187,9 @@
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.
integer type. Note that the member <span class="emphasis"><em>exact</em></span> is defined
<span class="bold"><strong>only</strong></span> if there is a type with exactly
N bits.
</p>
</td>
</tr>

View File

@ -105,7 +105,7 @@
of <code class="literal">high_bit_mask_t</code>.
</p>
<div class="table">
<a name="id674116"></a><p class="title"><b>Table<EFBFBD>2.<2E>Members of the `boost::high_bit_mask_t` Class Template</b></p>
<a name="id782311"></a><p class="title"><b>Table<EFBFBD>2.<2E>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>
@ -205,7 +205,7 @@
the members of an instantiation of <code class="literal">low_bits_mask_t</code>.
</p>
<div class="table">
<a name="id674318"></a><p class="title"><b>Table<EFBFBD>3.<2E>Members of the [^boost::low_bits_mask_t] Class Template</b></p>
<a name="id782512"></a><p class="title"><b>Table<EFBFBD>3.<2E>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>

View File

@ -40,7 +40,7 @@
<div><p class="copyright">Copyright <20> 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota,
John Maddock</p></div>
<div><div class="legalnotice">
<a name="id662860"></a><p>
<a name="id770995"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
@ -229,7 +229,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: November 25, 2009 at 12:02:32 GMT</small></p></td>
<td align="left"><p><small>Last revised: November 26, 2009 at 11:06:43 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>

View File

@ -282,6 +282,8 @@ This facility is particularly useful for solving generic programming problems.
template<int Bits>
struct int_t
{
/* Member exact may or may not be defined depending upon Bits */
typedef ``['implementation-defined-type]`` exact;
typedef ``['implementation-defined-type]`` least;
typedef int_fast_t<least>::fast fast;
};
@ -290,6 +292,8 @@ This facility is particularly useful for solving generic programming problems.
template<int Bits>
struct uint_t
{
/* Member exact may or may not be defined depending upon Bits */
typedef ``['implementation-defined-type]`` exact;
typedef ``['implementation-defined-type]`` least;
typedef int_fast_t<least>::fast fast;
};
@ -351,13 +355,16 @@ The following table describes each template's criteria.
[[^boost::int_t<N>]]
[The smallest built-in signed integral type with at least /N/ 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.]
larger than the number of bits in the largest integer type. Note that the member /exact/ is defined
[*only] if there is a type with exactly N bits.]
]
[
[[^boost::uint_t<N>]]
[The smallest built-in unsigned integral type with at least /N/ 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.]
parameter is larger than the number of bits in the largest integer type.
Note that the member /exact/ is defined
[*only] if there is a type with exactly N bits.]
]
[
[[^boost::int_max_value_t<V>]]