Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/integer/index.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 5.9 KB
RevLine 
[12]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<html>
3<head>
4<title>Boost Integer Library</title>
5</head>
6
7<body bgcolor="white" text="black">
8<table border="1" bgcolor="teal" cellpadding="2">
9        <tr>
10                <td bgcolor="white"><img src="../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td>
11                <td><a href="../../index.htm"><font face="Arial" color="white"><big>Home</big></font></a></td>
12                <td><a href="../libraries.htm"><font face="Arial" color="white"><big>Libraries</big></font></a></td>
13                <td><a href="../../people/people.htm"><font face="Arial" color="white"><big>People</big></font></a></td>
14                <td><a href="../../more/faq.htm"><font face="Arial" color="white"><big>FAQ</big></font></a></td>
15                <td><a href="../../more/index.htm"><font face="Arial" color="white"><big>More</big></font></a></td>
16        </tr>
17</table>
18
19<h1>Boost Integer Library</h1>
20
21<table border="1" cellpadding="5">
22        <tr>
23                <th>Header / Docs</th>
24                <th>Contents</th>
25                <th>Use</th>
26        </tr>
27        <tr>
28                <td align="center"><cite><a href="../../boost/integer_fwd.hpp">&lt;boost/integer_fwd.hpp&gt;</a></cite></td>
29                <td valign="top">Forward declarations of classes and class templates</td>
30                <td valign="top">When just the name of a class is needed</td>
31        </tr>
32        <tr>
33                <td align="center"><code><a href="../../boost/cstdint.hpp">&lt;boost/cstdint.hpp&gt;<br>
34      </a></code><a href="cstdint.htm"><br>
35      documentation</a>
36    </td>
37                <td valign="top">Typedef's based on the 1999 C Standard header &lt;<code>stdint.h&gt;</code>, wrapped in namespace boost.
38      This implementation may #include the compiler
39      supplied &lt;<code>stdint.h&gt;</code>, if present.  </td>
40                <td valign="top">Supplies typedefs for standard integer types such as <code> int32_t</code> or <code>uint_least16_t</code>.
41      Use in preference to &lt;<code>stdint.h&gt;</code>
42      for enhanced portability.  Furthermore, all names are safely placed in the boost namespace.</td>
43        </tr>
44        <tr>
45                <td align="center"><code><a href="../../boost/integer_traits.hpp">&lt;boost/integer_traits.hpp&gt;</a></code><br>
46    <br>
47    <a href="integer_traits.html">documentation</a>
48    </td>
49                <td valign="top">Template class <code>boost::integer_traits</code>, derived from <code>std::numeric_limits</code>.&nbsp;
50      Adds <code>const_min</code> and <code>const_max</code> members.</td>
51                <td valign="top">Use to obtain the characteristics of a known integer type.</td>
52        </tr>
53        <tr>
54                <td align="center"><code><a href="../../boost/integer.hpp">&lt;boost/integer.hpp&gt;</a><br>
55      <br>
56      </code><a href="integer.htm">documentation</a></td>
57                <td valign="top">Templates for integer type selection based on properties such as
58      maximum value or number of bits.</td>
59                <td valign="top">Use to select the type an integer when some property such as maximum value or number of bits is known.
60      Useful for generic programming. </td>
61        </tr>
62        <tr>
63                <td align="center"><code><a href="../../boost/integer/integer_mask.hpp">&lt;boost/integer/integer_mask.hpp&gt;</a><br>
64      <br>
65      </code><a href="doc/integer_mask.html">documentation</a></td>
66                <td valign="top">Templates for the selection of integer masks, single or lowest group, based on the number of bits.</td>
67                <td valign="top">Use to select a particular mask when the bit position(s) are based on a compile-time variable.
68      Useful for generic programming. </td>
69        </tr>
70        <tr>
71                <td align="center"><code><a href="../../boost/integer/static_log2.hpp">&lt;boost/integer/static_log2.hpp&gt;</a><br>
72      <br>
73      </code><a href="doc/static_log2.html">documentation</a></td>
74                <td valign="top">Template for finding the highest power of two in a number.</td>
75                <td valign="top">Use to find the bit-size/range based on a maximum value.
76      Useful for generic programming. </td>
77        </tr>
78        <tr>
79                <td align="center"><code><a href="../../boost/integer/static_min_max.hpp">&lt;boost/integer/static_min_max.hpp&gt;</a><br>
80      <br>
81      </code><a href="doc/static_min_max.html">documentation</a></td>
82                <td valign="top">Templates for finding the extrema of two numbers.</td>
83                <td valign="top">Use to find a bound based on a minimum or maximum value.
84      Useful for generic programming. </td>
85        </tr>
86</table>
87
88<h2>Rationale</h2>
89
90<p>The organization of boost integer headers and classes is designed to
91take advantage of <cite>&lt;stdint.h&gt;</cite> types from the 1999 C
92standard without resorting to undefined behavior in terms of the 1998
93C++ standard.  The header <cite>&lt;boost/cstdint.hpp&gt;</cite> makes
94the standard integer types safely available in namespace
95<code>boost</code> without placing any names in namespace
96<code>std</code>.  As always, the intension is to complement rather than
97compete with the C++ Standard Library.  Should some future C++ standard
98include <cite>&lt;stdint.h&gt;</cite> and <cite>&lt;cstdint&gt;</cite>,
99then <cite>&lt;boost/cstdint.hpp&gt;</cite> will continue to function,
100but will become redundant and may be safely deprecated.</p>
101
102<p>Because these are boost headers, their names conform to boost header
103naming conventions rather than C++ Standard Library header naming
104conventions.</p>
105
106<h2><i>Caveat emptor</i></h2>
107
108<p>As an implementation artifact, certain C
109<cite>&lt;limits.h&gt;</cite> macro names may possibly be visible to
110users of <cite>&lt;boost/cstdint.hpp&gt;</cite>.  Don't use these
111macros; they are not part of any Boost-specified interface.  Use
112<code>boost::integer_traits&lt;&gt;</code> or
113<code>std::numeric_limits&lt;&gt;</code> instead.</p>
114
115<p>As another implementation artifact, certain C
116<cite>&lt;stdint.h&gt;</cite> typedef names may possibly be visible in
117the global namespace to users of <cite>&lt;boost/cstdint.hpp&gt;</cite>.
118 Don't use these names, they are not part of any Boost-specified
119interface.  Use the respective names in namespace <code>boost</code>
120instead.</p>
121
122<hr>
123
124<p>Revised: <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->03 Oct 2001<!--webbot bot="Timestamp" endspan i-checksum="14373" -->
125</p>
126
127</body>
128</html>
Note: See TracBrowser for help on using the repository browser.